ArangoDB2

 view release on metacpan or  search on metacpan

lib/ArangoDB2/Transaction.pm  view on Meta::CPAN

package ArangoDB2::Transaction;

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;



# action
#
# get/set action
sub action { shift->_get_set('action', @_) }

# collections
#
# get/set collections
sub collections { shift->_get_set('collections', @_) }

sub execute
{
    my($self, $args) = @_;
    # process args
    $args = $self->_build_args($args, [qw(
        action collections lockTimeout params waitForSync
    )]);

    return $self->arango->http->post(
        $self->api_path('transaction'),
        undef,
        $JSON->encode($args),
    );
}

# lockTimeout
#
# get/set lockTimeout
sub lockTimeout { shift->_get_set('lockTimeout', @_) }

# params
#
# get/set params
sub params { shift->_get_set('params', @_) }

# waitForSync
#
# get/set waitForSync value
sub waitForSync { shift->_get_set_bool('waitForSync', @_) }

1;

__END__

=head1 NAME

ArangoDB2::Transaction - ArangoDB transaction API methods

=head1 METHODS

=over 4

=item new

=item action

=item collections



( run in 1.161 second using v1.01-cache-2.11-cpan-39bf76dae61 )