Arango-Tango
view release on metacpan or search on metacpan
t/03-document.t view on Meta::CPAN
my $collection = $db->create_collection("collection");
$collection->create_document( { Hello => 'World' });
my $count = $collection->count;
is $count->{count}, 1;
my $list = $collection->document_paths();
is ref($list) => "ARRAY" => "List of paths is an array";
like $list->[0] => qr!/_db/tmp_/_api/document/collection/\d+! => "path looks right";
$collection->create_document( q!{ "Hello" : "World", "_key" : "baz" }! );
$list = $collection->document_paths();
is scalar(@$list), 2;
my $document = $collection->document("baz");
is ref($document) => "HASH" => "document retrieved correctly";
$collection->bulk_import([{"name" => "Euler", "_key" => "E"}], waitForSync => 1);
( run in 0.291 second using v1.01-cache-2.11-cpan-64827b87656 )