Arango-Tango
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Arango/Tango/Collection.pm view on Meta::CPAN
inject_properties => [ 'database', 'name' ],
},
};
}
sub _new {
my ($class, %opts) = @_;
return bless {%opts} => $class;
}
sub bulk_import {
my ($self, $documents, %options) = @_;
$options{type} ||= "list";
return $self->{arango}->_api( bulk_import_list => {
database => $self->{database},
collection => $self->{name},
_body => $documents,
_url_parameters => \%options
lib/Arango/Tango/Cursor.pm view on Meta::CPAN
use strict;
use Data::Dumper;
sub _new {
my ($class, %opts) = @_;
my $self = { arango => $opts{arango}, database => $opts{database} };
my $ans = $self->{arango}->_api('create_cursor', \%opts);
return bless { %$ans, %$self, __current => 0 } => $class;
}
sub next {
my $self = shift;
if (!$self->{error} && $self->{__current} == 0) {
$self->{__current}++;
return $self->{result};
}
lib/Arango/Tango/Database.pm view on Meta::CPAN
},
signature => [ 'name' ],
inject_properties => [ { prop => 'name', as => 'database' } ]
}
};
}
sub _new {
my ($class, %opts) = @_;
return bless {%opts} => $class;
}
sub delete {
my $self = shift;
return $self->{arango}->delete_database($self->{name});
}
sub cursor {
my ($self, $aql, %opts) = @_;
return Arango::Tango::Cursor->_new(arango => $self->{arango}, database => $self->{name}, query => $aql, %opts);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.856 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )