These functions implement the HTTP API for manipulating databases.
ArangoDB.createDatabase(String name) : Boolean
Creates a new database with the given name.
Arguments
-
name:
String
Name of the database to create
Examples
ArangoDB arango = new ArangoDB.Builder().build();
arango.createDatabase("myDB");
ArangoDatabase.create() : Boolean
Creates the database.
Alternative for ArangoDB.createDatabase.
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
db.create();
ArangoDatabase.exists() : boolean
Checks whether the database exists
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
boolean exists = db.exists();
ArangoDatabase.getInfo() : DatabaseEntity
Retrieves information about the current database
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
DatabaseEntity info = db.getInfo();
ArangoDB.getDatabases() : Collection<String>
Retrieves a list of all existing databases
Examples
ArangoDB arango = new ArangoDB.Builder().build();
Collection<String> names = arango.getDatabases();
ArangoDatabase.drop() : Boolean
Deletes the database from the server.
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
db.drop();