NAME

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

VERSION

version 0.50

SYNOPSIS

$summary = $session->execute_write( sub ($transaction) {
  return $transaction->run( ... )->consume;
});

# SummaryCounters
$counters = $summary->counters;

# Query information
$query  = $summary->statement->{text};
$params = $summary->statement->{parameters};
$plan   = $summary->plan;
@notes  = $summary->notifications;

# ServerInfo
$address = $summary->server->address;
$version = $summary->server->agent;

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.

To obtain a result summary, call "consume" in Neo4j::Driver::Result.

METHODS

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

counters

$summary_counters = $summary->counters;

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

notifications

use Data::Dumper;
@notifications = $summary->notifications;
print Dumper @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. In scalar context, return the number of notifications.

This driver only supports notifications over HTTP.

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.

This driver only supports execution plans over HTTP.

server

$address = $summary->server->address;
$version = $summary->server->agent;

The ServerInfo, consisting of the host, port, protocol and Neo4j version.

statement

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

The statement and parameters this summary is for.

SEE ALSO

AUTHOR

Arne Johannessen (AJNN)

COPYRIGHT AND LICENSE

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

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0 or (at your option) the same terms as the Perl 5 programming language system itself.