ArangoDB2/Traversal.pm

filter: Statementstmt 47.3% 18 / 38 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 22.7% 5 / 22 Podpod 100% 17 / 17 totaltotal 47.6% 40 / 84 CC 3 SCAR 11.1
CC
3
Cov
42%
execute
12.0
direction
2.0
edgeCollection
2.0
CRAP 3.0
« ArangoDB2/User.pm ↑ Summary ArangoDB2/Replication.pm »
1 package ArangoDB2::Traversal;
2  
3 22 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 22 ▶use base qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
7 ArangoDB2::Base
8 22 );
9  
10 22 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 22 ▶use JSON::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 22 my $JSON = JSON::XS->new->utf8;
14  
15 22 my @PARAMS = qw(
16 direction edgeCollection expander filter graphName init itemOrder maxDepth
17 maxIterations minDepth order sort startVertex strategy uniqueness visitor
18 );
19  
20 # direction
21 #
22 # get/ set direction
23 0 ▶sub direction { shift->_get_set('direction', @_) }
Subroutine direction: not called CC=1 SCAR=6.9
Pod documented
24  
25 # edgeCollection
26 #
27 # get/ set edgeCollection
28 0 ▶sub edgeCollection { shift->_get_set('edgeCollection', @_) }
Subroutine edgeCollection: not called CC=1 SCAR=6.9
Pod documented
29  
30 # execute
31 #
32 # POST /_api/traversal
33 sub execute
34 0 ▶{
Subroutine execute: not called CC=3 SCAR=24.8
Pod documented
35 0 my($self, $args) = @_;
36 # process request args
37 0 $args = $self->_build_args($args, \@PARAMS);
38 # if neither edgeCollection or graphName is set then
39 # use the current graph name
40 $args->{graphName} = $self->graph->name
41 unless defined $args->{graphName}
42 0 ▶ or defined $args->{edgeCollection};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args->{"graphName"} or defined $args->{"edgeCollection"} 0 0 0
Condition0%0/3
defined $args->{"graphName"} or defined $args->{"edgeCollection"}
l!l&&r!l&&!r
000
MC/DC0%0/2
defined $args->{"graphName"} or defined $args->{"edgeCollection"}
defined $args->{"graphName"} defined $args->{"edgeCollection"}
Truth table0%0/3
A or B
A= defined $args->{"graphName"}B= defined $args->{"edgeCollection"}
ABresult
1X1
011
000
43 # make request
44 0 return $self->arango->http->post(
45 $self->api_path('traversal'),
46 undef,
47 $JSON->encode($args),
48 );
49 }
50  
51 # expander
52 #
53 # get/ set expander
54 0 ▶sub expander { shift->_get_set('expander', @_) }
Subroutine expander: not called CC=1 SCAR=6.9
Pod documented
55  
56 # filter
57 #
58 # get/ set filter
59 0 ▶sub filter { shift->_get_set('filter', @_) }
Subroutine filter: not called CC=1 SCAR=6.9
Pod documented
60  
61 # graphName
62 #
63 # get/ set graphName
64 0 ▶sub graphName { shift->_get_set('graphName', @_) }
Subroutine graphName: not called CC=1 SCAR=6.9
Pod documented
65  
66 # init
67 #
68 # get/ set init
69 0 ▶sub init { shift->_get_set('init', @_) }
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
70  
71 # itemOrder
72 #
73 # get/ set itemOrder
74 0 ▶sub itemOrder { shift->_get_set('itemOrder', @_) }
Subroutine itemOrder: not called CC=1 SCAR=6.9
Pod documented
75  
76 # maxDepth
77 #
78 # get/ set maxDepth
79 0 ▶sub maxDepth { shift->_get_set('maxDepth', @_) }
Subroutine maxDepth: not called CC=1 SCAR=6.9
Pod documented
80  
81 # maxIterations
82 #
83 # get/ set maxIterations
84 0 ▶sub maxIterations { shift->_get_set('maxIterations', @_) }
Subroutine maxIterations: not called CC=1 SCAR=6.9
Pod documented
85  
86 # minDepth
87 #
88 # get/ set minDepth
89 0 ▶sub minDepth { shift->_get_set('minDepth', @_) }
Subroutine minDepth: not called CC=1 SCAR=6.9
Pod documented
90  
91 # order
92 #
93 # get/ set order
94 0 ▶sub order { shift->_get_set('order', @_) }
Subroutine order: not called CC=1 SCAR=6.9
Pod documented
95  
96 # sort
97 #
98 # get/ set sort
99 0 ▶sub sort { shift->_get_set('sort', @_) }
Subroutine sort: not called CC=1 SCAR=6.9
Pod documented
100  
101 # startVertex
102 #
103 # get/ set startVertex
104 0 ▶sub startVertex { shift->_get_set_id('startVertex', @_) }
Subroutine startVertex: not called CC=1 SCAR=6.9
Pod documented
105  
106 # strategy
107 #
108 # get/ set strategy
109 0 ▶sub strategy { shift->_get_set('strategy', @_) }
Subroutine strategy: not called CC=1 SCAR=6.9
Pod documented
110  
111 # uniqueness
112 #
113 # get/ set uniqueness
114 0 ▶sub uniqueness { shift->_get_set('uniqueness', @_) }
Subroutine uniqueness: not called CC=1 SCAR=6.9
Pod documented
115  
116 # visitor
117 #
118 # get/ set visitor
119 0 ▶sub visitor { shift->_get_set('visitor', @_) }
Subroutine visitor: not called CC=1 SCAR=6.9
Pod documented
120  
121 22 1;
122  
123 __END__
« ArangoDB2/User.pm ↑ Summary ArangoDB2/Replication.pm »