ListDatabaseNames
in package
FinalYes
Operation for the ListDatabases command, returning only database names.
Tags
Table of Contents
Properties
- $listDatabases : ListDatabases
Methods
- __construct() : mixed
- Constructs a listDatabases command.
- execute() : Iterator<int, string>
- Execute the operation.
Properties
$listDatabases
private
ListDatabases
$listDatabases
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.
-
comment (mixed): BSON value to attach as a comment to this command.
This is not supported for servers versions < 4.4.
-
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
execute()
Execute the operation.
public
execute(Server $server) : Iterator<int, string>
Parameters
- $server : Server