The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Neo4j::Driver::ResultSummary - Details about the result of running a statement

VERSION

version 0.11

SYNOPSIS

 use Neo4j::Driver;
 my $driver = Neo4j::Driver->new->basic_auth(...);
 
 my $transaction = $driver->session->begin_transaction;
 $transaction->{return_stats} = 1;
 my $result = $transaction->run('MATCH (a)-[:KNOWS]-(b) RETURN a, b');
 my $summary = $result->summary;
 
 # SummaryCounters
 my $counters = $summary->counters;
 
 # query information
 my $query  = $summary->statement->{text};
 my $params = $summary->statement->{parameters};
 my $plan   = $summary->plan;
 my @notes  = @{ $summary->notifications };

DESCRIPTION

The result summary of running a statement. The result summary can be used to investigate details about the result, like the Neo4j server version, how many and which kinds of updates have been executed, and query plan information if available.

The Perl driver does not currently provide ServerInfo as part of the result summary. Use Neo4j::Driver::Session to obtain this information instead.

METHODS

Neo4j::Driver::ResultSummary implements the following methods.

counters

 my $summary_counters = $summary->counters;

Returns the SummaryCounters with statistics counts for operations the statement triggered.

notifications

 use Data::Dumper;
 print Dumper $summary->notifications;

A list of notifications that might arise when executing the statement. Notifications can be warnings about problematic statements or other valuable information that can be presented in a client. Unlike failures or errors, notifications do not affect the execution of a statement.

plan

 use Data::Dumper;
 print Dumper $summary->plan;

This describes how the database will execute your statement. Available if this is the summary of a Cypher EXPLAIN statement.

statement

 my $query  = $summary->statement->{text};
 my $params = $summary->statement->{parameters};

The statement and parameters this summary is for.

EXPERIMENTAL FEATURES

Neo4j::Driver::ResultSummary implements the following experimental features. These are subject to unannounced modification or removal in future versions. Expect your code to break if you depend upon these features.

Calling in list context

 my @notifications = $summary->notifications;

The notifications method tries to Do What You Mean if called in list context.

SEE ALSO

Neo4j::Driver, Neo4j::Driver::Session, Neo4j::Driver::SummaryCounters, Neo4j Java Driver, Neo4j JavaScript Driver, Neo4j .NET Driver

AUTHOR

Arne Johannessen <ajnn@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016-2019 by Arne Johannessen.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)