\triagens\ArangoDbDatabase

A class for managing ArangoDB Databases

This class provides functions to manage Databases through ArangoDB's Database API

Summary

Methods
Properties
Constants
create()
delete()
listDatabases()
listUserDatabases()
getInfo()
No public properties found
ENTRY_DATABASE_NAME
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ENTRY_DATABASE_NAME

ENTRY_DATABASE_NAME

Databases index

Methods

create()

create(\triagens\ArangoDb\Connection $connection, string $name) : array

creates a database

This creates a new database

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used
string $name
  • the database specification, for example 'myDatabase'

Returns

array —

$responseArray - The response array.

delete()

delete(\triagens\ArangoDb\Connection $connection, string $name) : array

Deletes a database

This will delete an existing database.

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used
string $name
  • the database specification, for example 'myDatabase'

Returns

array —

$responseArray - The response array.

listDatabases()

listDatabases(\triagens\ArangoDb\Connection $connection) : array

List databases

This will list the databases that exist on the server

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used

Returns

array —

$responseArray - The response array.

listUserDatabases()

listUserDatabases(\triagens\ArangoDb\Connection $connection) : array

List user databases

Retrieves the list of all databases the current user can access without specifying a different username or password.

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used

Returns

array —

$responseArray - The response array.

getInfo()

getInfo(\triagens\ArangoDb\Connection $connection) : array

Retrieves information about the current database

This will get information about the currently used database from the server

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used

Returns

array —

$responseArray - The response array.