Oihana PHP Arango

currentDatabase.php

Table of Contents

Functions

currentDatabase()  : string
Returns the name of the current database.

Functions

currentDatabase()

Returns the name of the current database.

currentDatabase() : string

The current database is the database name that was specified in the URL path of the request (or defaults to _system database).

Returns databaseName (string): the current database name

This helper wraps the ArangoDB AQL function CURRENT_DATABASE().

Example AQL output:

CURRENT_DATABASE()
Tags
example
use function oihana\arango\db\functions\collectionCount;

$expr = currentDatabase();
// Produces: 'CURRENT_DATABASE()'
see
https://docs.arangodb.com/stable/aql/functions/miscellaneous/#current_database
since
1.0.0

author Marc Alcaraz

Return values
string

The formatted AQL expression (e.g. 'CURRENT_DATABASE()').

On this page

Search results