line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
301
|
use 5.010; |
|
17
|
|
|
|
|
58
|
|
2
|
17
|
|
|
17
|
|
104
|
use strict; |
|
17
|
|
|
|
|
30
|
|
|
17
|
|
|
|
|
366
|
|
3
|
17
|
|
|
17
|
|
87
|
use warnings; |
|
17
|
|
|
|
|
27
|
|
|
17
|
|
|
|
|
603
|
|
4
|
17
|
|
|
17
|
|
120
|
use utf8; |
|
17
|
|
|
|
|
50
|
|
|
17
|
|
|
|
|
89
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::ResultSummary; |
7
|
|
|
|
|
|
|
# ABSTRACT: Details about the result of running a statement |
8
|
|
|
|
|
|
|
$Neo4j::Driver::ResultSummary::VERSION = '0.40'; |
9
|
|
|
|
|
|
|
|
10
|
17
|
|
|
17
|
|
1108
|
use Carp qw(croak); |
|
17
|
|
|
|
|
50
|
|
|
17
|
|
|
|
|
1176
|
|
11
|
|
|
|
|
|
|
|
12
|
17
|
|
|
17
|
|
6390
|
use Neo4j::Driver::SummaryCounters; |
|
17
|
|
|
|
|
36
|
|
|
17
|
|
|
|
|
6716
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
|
|
|
|
|
|
# uncoverable pod (private method) |
17
|
65
|
|
|
65
|
0
|
204
|
my ($class, $result, $notifications, $statement, $server_info) = @_; |
18
|
65
|
|
|
|
|
119
|
my $self = {}; |
19
|
65
|
100
|
100
|
|
|
285
|
if ($result && $result->{stats}) { |
20
|
62
|
|
|
|
|
648
|
$self->{counters} = $result->{stats}; |
21
|
62
|
|
|
|
|
173
|
$self->{plan} = $result->{plan}; |
22
|
62
|
|
|
|
|
1132
|
$self->{notifications} = $notifications; |
23
|
62
|
|
|
|
|
107
|
$self->{statement} = $statement; |
24
|
62
|
|
|
|
|
109
|
$self->{server_info} = $server_info; |
25
|
|
|
|
|
|
|
} |
26
|
65
|
|
|
|
|
312
|
return bless $self, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _init { |
31
|
78
|
|
|
78
|
|
162
|
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
|
|
|
|
2556
|
croak 'Result missing stats' unless $self->{statement}; |
36
|
75
|
|
|
|
|
304
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub counters { |
41
|
8
|
|
|
8
|
1
|
17
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
8
|
|
|
|
|
47
|
return Neo4j::Driver::SummaryCounters->new( $self->{counters} ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub notifications { |
48
|
8
|
|
|
8
|
1
|
3101
|
my ($self) = @_; |
49
|
|
|
|
|
|
|
|
50
|
8
|
|
100
|
|
|
31
|
$self->{notifications} //= []; |
51
|
8
|
|
|
|
|
11
|
return @{ $self->{notifications} }; |
|
8
|
|
|
|
|
41
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub plan { |
56
|
2
|
|
|
2
|
1
|
34
|
my ($self) = @_; |
57
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
10
|
return $self->{plan}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub statement { |
63
|
3
|
|
|
3
|
1
|
49
|
my ($self) = @_; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
return { |
66
|
|
|
|
|
|
|
text => $self->{statement}->{statement}, |
67
|
|
|
|
|
|
|
parameters => $self->{statement}->{parameters} // {}, |
68
|
3
|
|
100
|
|
|
49
|
}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub server { |
73
|
1
|
|
|
1
|
1
|
916
|
my ($self) = @_; |
74
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
8
|
return $self->{server_info}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |