line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
293
|
use 5.010; |
|
17
|
|
|
|
|
55
|
|
2
|
17
|
|
|
17
|
|
89
|
use strict; |
|
17
|
|
|
|
|
29
|
|
|
17
|
|
|
|
|
388
|
|
3
|
17
|
|
|
17
|
|
78
|
use warnings; |
|
17
|
|
|
|
|
54
|
|
|
17
|
|
|
|
|
661
|
|
4
|
17
|
|
|
17
|
|
114
|
use utf8; |
|
17
|
|
|
|
|
34
|
|
|
17
|
|
|
|
|
90
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::ResultSummary; |
7
|
|
|
|
|
|
|
# ABSTRACT: Details about the result of running a statement |
8
|
|
|
|
|
|
|
$Neo4j::Driver::ResultSummary::VERSION = '0.39'; |
9
|
|
|
|
|
|
|
|
10
|
17
|
|
|
17
|
|
1149
|
use Carp qw(croak); |
|
17
|
|
|
|
|
32
|
|
|
17
|
|
|
|
|
1116
|
|
11
|
|
|
|
|
|
|
|
12
|
17
|
|
|
17
|
|
6183
|
use Neo4j::Driver::SummaryCounters; |
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
6795
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
|
|
|
|
|
|
# uncoverable pod (private method) |
17
|
65
|
|
|
65
|
0
|
200
|
my ($class, $result, $notifications, $statement, $server_info) = @_; |
18
|
65
|
|
|
|
|
140
|
my $self = {}; |
19
|
65
|
100
|
100
|
|
|
317
|
if ($result && $result->{stats}) { |
20
|
62
|
|
|
|
|
658
|
$self->{counters} = $result->{stats}; |
21
|
62
|
|
|
|
|
158
|
$self->{plan} = $result->{plan}; |
22
|
62
|
|
|
|
|
1235
|
$self->{notifications} = $notifications; |
23
|
62
|
|
|
|
|
115
|
$self->{statement} = $statement; |
24
|
62
|
|
|
|
|
111
|
$self->{server_info} = $server_info; |
25
|
|
|
|
|
|
|
} |
26
|
65
|
|
|
|
|
324
|
return bless $self, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _init { |
31
|
78
|
|
|
78
|
|
146
|
my ($self) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# The purpose of this method is to fail as early as possible if we don't |
34
|
|
|
|
|
|
|
# have all necessary info. This should improve the user experience. |
35
|
78
|
100
|
|
|
|
2550
|
croak 'Result missing stats' unless $self->{statement}; |
36
|
75
|
|
|
|
|
306
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub counters { |
41
|
8
|
|
|
8
|
1
|
17
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
8
|
|
|
|
|
48
|
return Neo4j::Driver::SummaryCounters->new( $self->{counters} ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub notifications { |
48
|
8
|
|
|
8
|
1
|
3652
|
my ($self) = @_; |
49
|
|
|
|
|
|
|
|
50
|
8
|
|
100
|
|
|
30
|
$self->{notifications} //= []; |
51
|
8
|
|
|
|
|
11
|
return @{ $self->{notifications} }; |
|
8
|
|
|
|
|
44
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub plan { |
56
|
2
|
|
|
2
|
1
|
42
|
my ($self) = @_; |
57
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
11
|
return $self->{plan}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub statement { |
63
|
3
|
|
|
3
|
1
|
54
|
my ($self) = @_; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
return { |
66
|
|
|
|
|
|
|
text => $self->{statement}->{statement}, |
67
|
|
|
|
|
|
|
parameters => $self->{statement}->{parameters} // {}, |
68
|
3
|
|
100
|
|
|
58
|
}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub server { |
73
|
1
|
|
|
1
|
1
|
964
|
my ($self) = @_; |
74
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
5
|
return $self->{server_info}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |