Neo4j::Driver::ResultSummary - Details about the result of running a statement
version 0.15
use Neo4j::Driver; $driver = Neo4j::Driver->new->basic_auth(...); $result = $driver->session->run('MATCH (a)-[:KNOWS]-(b) RETURN a, b'); $summary = $result->summary; # SummaryCounters $counters = $summary->counters; # query information $query = $summary->statement->{text}; $params = $summary->statement->{parameters}; $plan = $summary->plan; @notes = $summary->notifications;
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.
ServerInfo
Neo4j::Driver::ResultSummary implements the following methods.
$summary_counters = $summary->counters;
Returns the SummaryCounters with statistics counts for operations the statement triggered.
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.
At time of this writing, notifications are not supported on a Bolt connection for this driver.
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.
EXPLAIN
At time of this writing, execution plans are not supported on a Bolt connection for this driver.
$query = $summary->statement->{text}; $params = $summary->statement->{parameters};
The statement and parameters this summary is for.
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.
$notifications = $summary->notifications; # arrayref
The notifications() method returns an array reference if called in scalar context, or undef if there are no notifications.
notifications()
undef
Neo4j::Driver
Neo4j::Driver::Session, Neo4j::Driver::SummaryCounters
Equivalent documentation for the official Neo4j drivers: ResultSummary (Java), ResultSummary (JavaScript), IResultSummary (.NET)
Arne Johannessen <ajnn@cpan.org>
This software is Copyright (c) 2016-2020 by Arne Johannessen.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Neo4j::Driver, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Neo4j::Driver
CPAN shell
perl -MCPAN -e shell install Neo4j::Driver
For more information on module installation, please visit the detailed CPAN module installation guide.