clarango.database

collection-exists?

(collection-exists? collection-name & args)
Returns true if a collection with the given name exists, otherwise returns false.

Can be called without arguments. In that case the default database will be used.
Optionally you can pass a database name as second argument.

create

(create database-name users)
Creates a new database.

First argument: the name of the new database
Second argument: a vector specifying users to initially create for the new database; 
  can be empty; in this case a default user 'root' with an empty password will be created;
  if not empty, it must contain user objects which may contain the following options:
    - username: the user name as a string
    - passwd: the user password as a string; if omitted, an empty password will be set
    - active: boolean flag indicating whether the user accout should be actived or not; default is true;
    - extra: an optional map of user information that will be saved, but not interpreted by ArangoDB

database-exists?

(database-exists? database-name)
Returns true if a database with the given name exists, otherwise returns false.

delete

(delete database-name)
Deletes a database.

Expects the database name of the database to be dropped as argument.

get-all-graphs

(get-all-graphs & args)
Gets a list of all existing graphs within the database.

Can be called without arguments. In that case the default database will be used.
Optionally you can pass a database name as argument.

get-collection-info-list

(get-collection-info-list & args)
Returns information about all collections in a database as a list.

Can be called without arguments. In that case the default database will be used.
Optionally you can pass a database and a map with options as arguments.
Possible options in the options map are:
{'excludeSystem' true/false}
- excludeSystem meaning whether or not the system collections should be excluded from the result.

get-info-current

(get-info-current)
Returns information about the current database.

get-info-list

(get-info-list)
Returns a list of all existing databases.

get-info-user

(get-info-user)
Returns a list of all databases the current user can access.

Note: this might not work under Windows.

graph-exists?

(graph-exists? graph-name & args)
Returns true if a graph with the given name exists, otherwise returns false.

Can be called without arguments. In that case the default database will be used.
Optionally you can pass a database name as second argument.