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

NAME

Neo4j::Driver::SummaryCounters - Statement statistics

VERSION

version 0.08

SYNOPSIS

 use Neo4j::Driver;
 my $driver = Neo4j::Driver->new->basic_auth(...);
 
 my $transaction = $driver->session->begin_transaction;
 $transaction->{return_stats} = 1;
 my $query = 'MATCH (n:Novel {name:"1984"}) SET n.writer = "Orwell"';
 my $result = $transaction->run($query);
 
 my $counters = $result->summary->counters;
 my $database_modified = $counters->contains_updates;
 die "That didn't work out." unless $database_modified;

DESCRIPTION

Contains counters for various operations that a statement triggered.

ATTRIBUTES

Neo4j::Driver::SummaryCounters implements the following read-only attributes.

 my $constraints_added     = $counters->constraints_added;
 my $constraints_removed   = $counters->constraints_removed;
 my $contains_updates      = $counters->contains_updates;
 my $indexes_added         = $counters->indexes_added;
 my $indexes_removed       = $counters->indexes_removed;
 my $labels_added          = $counters->labels_added;
 my $labels_removed        = $counters->labels_removed;
 my $nodes_created         = $counters->nodes_created;
 my $nodes_deleted         = $counters->nodes_deleted;
 my $properties_set        = $counters->properties_set;
 my $relationships_created = $counters->relationships_created;

There is no relationships_deleted attribute because this value is not provided by the Neo4j server.

SEE ALSO

Neo4j::Driver, Neo4j Java Driver

AUTHOR

Arne Johannessen <ajnn@cpan.org>

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)