ArangoDB2
view release on metacpan or search on metacpan
lib/ArangoDB2/Cursor.pm view on Meta::CPAN
# new
#
# create new instance
sub new
{
my($class, $arango, $database, $data) = @_;
my $self = $class->SUPER::new($arango, $database);
$self->{data} = $data;
return $self;
}
# all
#
# get all results
sub all
{
lib/ArangoDB2/Edge.pm view on Meta::CPAN
# create
#
# override ArangoDB2::Document create so that we can add from
# and to values to the request
sub create
{
my($self, $data, $args) = @_;
# process args
$args = $self->_build_args($args, ['from','to']);
# call ArangoDB2::Document::create
return $self->SUPER::create($data, $args);
}
# from
#
# get/set from
sub from { shift->_get_set_id('from', @_) }
# to
#
# get/set to
lib/ArangoDB2/Graph/Edge.pm view on Meta::CPAN
my($self, $data, $args) = @_;
# require data
die "Invlalid args"
unless ref $data eq 'HASH';
# process args
$args = $self->_build_args($args, ['from', 'to']);
# from and to go in data
$data->{_from} = delete $args->{from};
$data->{_to} = delete $args->{to};
return $self->SUPER::create($data, $args);
}
# from
#
# get/set from
sub from { shift->_get_set_id('from', @_) }
# to
#
# get/set to
lib/ArangoDB2/Query.pm view on Meta::CPAN
# new
#
# create new instance
sub new
{
my($class, $arango, $database, $query) = @_;
my $self = $class->SUPER::new($arango, $database);
$self->query($query);
return $self;
}
# batchSize
#
# maximum number of result documents
sub batchSize { shift->_get_set('batchSize', @_) }
( run in 0.342 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )