Documentation

ListDatabaseNames
in package
implements Executable

Operation for the ListDatabases command, returning only database names.

Tags
see
Client::listDatabaseNames()
see
http://docs.mongodb.org/manual/reference/command/ListDatabases/

Interfaces, Classes, Traits and Enums

Executable

Table of Contents

$listDatabases  : ListDatabases
__construct()  : mixed
Constructs a listDatabases command.
execute()  : Iterator
Execute the operation.

Properties

Methods

__construct()

Constructs a listDatabases command.

public __construct([array<string|int, mixed> $options = [] ]) : mixed

Supported options:

  • authorizedDatabases (boolean): Determines which databases are returned based on the user privileges.

    For servers < 4.0.5, this option is ignored.

  • filter (document): Query by which to filter databases.

  • maxTimeMS (integer): The maximum amount of time to allow the query to run.

  • session (MongoDB\Driver\Session): Client session.

Parameters
$options : array<string|int, mixed> = []

Command options

Tags
throws
InvalidArgumentException

for parameter/option parsing errors

Return values
mixed

execute()

Execute the operation.

public execute(Server $server) : Iterator
Parameters
$server : Server
Tags
see
Executable::execute()
throws
UnexpectedValueException

if the command response was malformed

throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
Iterator

Search results