line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ArangoDB2::Transaction; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
79
|
use strict; |
|
21
|
|
|
|
|
27
|
|
|
21
|
|
|
|
|
629
|
|
4
|
21
|
|
|
21
|
|
83
|
use warnings; |
|
21
|
|
|
|
|
28
|
|
|
21
|
|
|
|
|
510
|
|
5
|
|
|
|
|
|
|
|
6
|
21
|
|
|
|
|
1313
|
use base qw( |
7
|
|
|
|
|
|
|
ArangoDB2::Base |
8
|
21
|
|
|
21
|
|
78
|
); |
|
21
|
|
|
|
|
23
|
|
9
|
|
|
|
|
|
|
|
10
|
21
|
|
|
21
|
|
95
|
use Data::Dumper; |
|
21
|
|
|
|
|
24
|
|
|
21
|
|
|
|
|
890
|
|
11
|
21
|
|
|
21
|
|
86
|
use JSON::XS; |
|
21
|
|
|
|
|
24
|
|
|
21
|
|
|
|
|
4559
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $JSON = JSON::XS->new->utf8; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# action |
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
# get/set action |
20
|
0
|
|
|
0
|
1
|
|
sub action { shift->_get_set('action', @_) } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# collections |
23
|
|
|
|
|
|
|
# |
24
|
|
|
|
|
|
|
# get/set collections |
25
|
0
|
|
|
0
|
1
|
|
sub collections { shift->_get_set('collections', @_) } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub execute |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
1
|
|
my($self, $args) = @_; |
30
|
|
|
|
|
|
|
# process args |
31
|
0
|
|
|
|
|
|
$args = $self->_build_args($args, [qw( |
32
|
|
|
|
|
|
|
action collections lockTimeout params waitForSync |
33
|
|
|
|
|
|
|
)]); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $self->arango->http->post( |
36
|
|
|
|
|
|
|
$self->api_path('transaction'), |
37
|
|
|
|
|
|
|
undef, |
38
|
|
|
|
|
|
|
$JSON->encode($args), |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# lockTimeout |
43
|
|
|
|
|
|
|
# |
44
|
|
|
|
|
|
|
# get/set lockTimeout |
45
|
0
|
|
|
0
|
1
|
|
sub lockTimeout { shift->_get_set('lockTimeout', @_) } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# params |
48
|
|
|
|
|
|
|
# |
49
|
|
|
|
|
|
|
# get/set params |
50
|
0
|
|
|
0
|
1
|
|
sub params { shift->_get_set('params', @_) } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# waitForSync |
53
|
|
|
|
|
|
|
# |
54
|
|
|
|
|
|
|
# get/set waitForSync value |
55
|
0
|
|
|
0
|
1
|
|
sub waitForSync { shift->_get_set_bool('waitForSync', @_) } |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |