line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
287
|
use 5.010; |
|
17
|
|
|
|
|
50
|
|
2
|
17
|
|
|
17
|
|
89
|
use strict; |
|
17
|
|
|
|
|
31
|
|
|
17
|
|
|
|
|
407
|
|
3
|
17
|
|
|
17
|
|
79
|
use warnings; |
|
17
|
|
|
|
|
27
|
|
|
17
|
|
|
|
|
403
|
|
4
|
17
|
|
|
17
|
|
99
|
use utf8; |
|
17
|
|
|
|
|
48
|
|
|
17
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::ResultColumns; |
7
|
|
|
|
|
|
|
# ABSTRACT: Structure definition of Cypher result values |
8
|
|
|
|
|
|
|
$Neo4j::Driver::ResultColumns::VERSION = '0.40'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# This package is not part of the public Neo4j::Driver API. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
17
|
|
1054
|
use Carp qw(croak); |
|
17
|
|
|
|
|
30
|
|
|
17
|
|
|
|
|
5811
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
225
|
|
|
225
|
0
|
466
|
my ($class, $result) = @_; |
18
|
|
|
|
|
|
|
|
19
|
225
|
100
|
66
|
|
|
949
|
croak 'Result missing columns' unless $result && $result->{columns}; |
20
|
224
|
|
|
|
|
351
|
my $columns = $result->{columns}; |
21
|
224
|
|
|
|
|
335
|
my $column_keys = {}; |
22
|
224
|
|
|
|
|
638
|
for (my $f = scalar(@$columns) - 1; $f >= 0; $f--) { |
23
|
474
|
|
|
|
|
1246
|
$column_keys->{$columns->[$f]} = $f; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
224
|
|
|
|
|
617
|
return bless $column_keys, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub key { |
31
|
112
|
|
|
112
|
0
|
214
|
my ($self, $key) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# returns the index [!] of the field specified by the given key |
34
|
112
|
|
|
|
|
379
|
return $self->{$key}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub list { |
39
|
3
|
|
|
3
|
0
|
4
|
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
|
|
|
|
|
1169
|
return keys %$self; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub add { |
49
|
1
|
|
|
1
|
0
|
713
|
my ($self, $column) = @_; |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
3
|
my $index = $self->count; |
52
|
1
|
|
|
|
|
8
|
$self->{$column} = $index; |
53
|
1
|
|
|
|
|
5
|
return $index; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub count { |
58
|
3
|
|
|
3
|
0
|
807
|
my ($self) = @_; |
59
|
|
|
|
|
|
|
|
60
|
3
|
|
|
|
|
8
|
return scalar $self->list; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |