line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
295
|
use 5.010; |
|
17
|
|
|
|
|
54
|
|
2
|
17
|
|
|
17
|
|
97
|
use strict; |
|
17
|
|
|
|
|
33
|
|
|
17
|
|
|
|
|
431
|
|
3
|
17
|
|
|
17
|
|
77
|
use warnings; |
|
17
|
|
|
|
|
72
|
|
|
17
|
|
|
|
|
429
|
|
4
|
17
|
|
|
17
|
|
93
|
use utf8; |
|
17
|
|
|
|
|
88
|
|
|
17
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::ResultColumns; |
7
|
|
|
|
|
|
|
# ABSTRACT: Structure definition of Cypher result values |
8
|
|
|
|
|
|
|
$Neo4j::Driver::ResultColumns::VERSION = '0.38'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# This package is not part of the public Neo4j::Driver API. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
17
|
|
1053
|
use Carp qw(croak); |
|
17
|
|
|
|
|
43
|
|
|
17
|
|
|
|
|
5674
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
225
|
|
|
225
|
0
|
465
|
my ($class, $result) = @_; |
18
|
|
|
|
|
|
|
|
19
|
225
|
100
|
66
|
|
|
1044
|
croak 'Result missing columns' unless $result && $result->{columns}; |
20
|
224
|
|
|
|
|
356
|
my $columns = $result->{columns}; |
21
|
224
|
|
|
|
|
340
|
my $column_keys = {}; |
22
|
224
|
|
|
|
|
669
|
for (my $f = scalar(@$columns) - 1; $f >= 0; $f--) { |
23
|
474
|
|
|
|
|
1386
|
$column_keys->{$columns->[$f]} = $f; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
224
|
|
|
|
|
647
|
return bless $column_keys, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub key { |
31
|
112
|
|
|
112
|
0
|
228
|
my ($self, $key) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# returns the index [!] of the field specified by the given key |
34
|
112
|
|
|
|
|
1469
|
return $self->{$key}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub list { |
39
|
3
|
|
|
3
|
0
|
6
|
my ($self) = @_; |
40
|
3
|
|
|
|
|
42
|
warnings::warnif deprecated => "Neo4j::Driver::Record->{column_keys} is deprecated"; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# returns the unordered list of keys |
43
|
|
|
|
|
|
|
# (prior to version 0.1701, the list was returned in the original order) |
44
|
3
|
|
|
|
|
1134
|
return keys %$self; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub add { |
49
|
1
|
|
|
1
|
0
|
709
|
my ($self, $column) = @_; |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
4
|
my $index = $self->count; |
52
|
1
|
|
|
|
|
4
|
$self->{$column} = $index; |
53
|
1
|
|
|
|
|
5
|
return $index; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub count { |
58
|
3
|
|
|
3
|
0
|
795
|
my ($self) = @_; |
59
|
|
|
|
|
|
|
|
60
|
3
|
|
|
|
|
9
|
return scalar $self->list; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |