NAME

Arango::Tango::Database - ArangoDB Database object

VERSION

version 0.011

USAGE

This class should not be created directly. The Arango::Tango module is responsible for creating instances of this object.

Arango::Tango::Database answers to the following methods:

list_collections

my $cols = $database->list_collections;

Returns an array reference to the collections available in the database.

create_collection

my $col = $database->create_collection("col_name");

Creates a new collection and returns the object representing it (Arango::Tango::Collection).

collection

my $collection = $database->collection("some_collection");

Opens an existing collection, and returns a reference to a Arango::Tango::Collection representing it.

delete_collection

$database->delete_collection("col_name");

Deletes a collection.

cursor

my $cursor = $database->cursor( $aql_query, %opt );

Performs AQL queries, returning a cursor. An optional hash of options can be supplied. Supported hashes corresponde to the different attributes available in the ArangoDB REST API (https://docs.arangodb.com/3.4/HTTP/AqlQueryCursor/AccessingCursors.html).

delete

$db->delete;

Deletes the supplied database.

get_access_level

$perms = $db->get_access_level($user)
$perms = $db->get_access_level($user, $collection)

Fetch the database or collection access level for a specific user.

set_access_level

$db->set_access_level($user, "rw")
$db->set_sccess_level($user, "ro", $collection)

Set the database or collection access level for a specific user.

clear_access_level

$db->clear_access_level($user)
$db->clear_sccess_level($user, $collection)

Clears the database or collection access level for a specific user.

AUTHOR

Alberto Simões <ambs@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019-2020 by Alberto Simões.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.