line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
296
|
use 5.010; |
|
17
|
|
|
|
|
54
|
|
2
|
17
|
|
|
17
|
|
95
|
use strict; |
|
17
|
|
|
|
|
29
|
|
|
17
|
|
|
|
|
393
|
|
3
|
17
|
|
|
17
|
|
92
|
use warnings; |
|
17
|
|
|
|
|
29
|
|
|
17
|
|
|
|
|
591
|
|
4
|
17
|
|
|
17
|
|
128
|
use utf8; |
|
17
|
|
|
|
|
42
|
|
|
17
|
|
|
|
|
92
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::ResultSummary; |
7
|
|
|
|
|
|
|
# ABSTRACT: Details about the result of running a statement |
8
|
|
|
|
|
|
|
$Neo4j::Driver::ResultSummary::VERSION = '0.38'; |
9
|
|
|
|
|
|
|
|
10
|
17
|
|
|
17
|
|
1179
|
use Carp qw(croak); |
|
17
|
|
|
|
|
39
|
|
|
17
|
|
|
|
|
1057
|
|
11
|
|
|
|
|
|
|
|
12
|
17
|
|
|
17
|
|
6297
|
use Neo4j::Driver::SummaryCounters; |
|
17
|
|
|
|
|
37
|
|
|
17
|
|
|
|
|
6511
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
|
|
|
|
|
|
# uncoverable pod (private method) |
17
|
65
|
|
|
65
|
0
|
183
|
my ($class, $result, $notifications, $statement, $server_info) = @_; |
18
|
65
|
|
|
|
|
123
|
my $self = {}; |
19
|
65
|
100
|
100
|
|
|
1639
|
if ($result && $result->{stats}) { |
20
|
62
|
|
|
|
|
1530
|
$self->{counters} = $result->{stats}; |
21
|
62
|
|
|
|
|
137
|
$self->{plan} = $result->{plan}; |
22
|
62
|
|
|
|
|
99
|
$self->{notifications} = $notifications; |
23
|
62
|
|
|
|
|
108
|
$self->{statement} = $statement; |
24
|
62
|
|
|
|
|
145
|
$self->{server_info} = $server_info; |
25
|
|
|
|
|
|
|
} |
26
|
65
|
|
|
|
|
311
|
return bless $self, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _init { |
31
|
78
|
|
|
78
|
|
176
|
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
|
|
|
|
313
|
croak 'Result missing stats' unless $self->{statement}; |
36
|
75
|
|
|
|
|
760
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub counters { |
41
|
8
|
|
|
8
|
1
|
27
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
8
|
|
|
|
|
49
|
return Neo4j::Driver::SummaryCounters->new( $self->{counters} ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub notifications { |
48
|
8
|
|
|
8
|
1
|
3193
|
my ($self) = @_; |
49
|
|
|
|
|
|
|
|
50
|
8
|
|
100
|
|
|
31
|
$self->{notifications} //= []; |
51
|
8
|
|
|
|
|
10
|
return @{ $self->{notifications} }; |
|
8
|
|
|
|
|
45
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub plan { |
56
|
2
|
|
|
2
|
1
|
36
|
my ($self) = @_; |
57
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
9
|
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
|
|
|
41
|
}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub server { |
73
|
1
|
|
|
1
|
1
|
878
|
my ($self) = @_; |
74
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
6
|
return $self->{server_info}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |