Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc)
MongoDB\Operation\ListDatabases Class Reference
Inheritance diagram for MongoDB\Operation\ListDatabases:
MongoDB\Operation\Executable

Public Member Functions

 __construct (array $options=[])
 Constructs a listDatabases command.
 
 execute (Server $server)
 Execute the operation.
 

Constructor & Destructor Documentation

◆ __construct()

MongoDB\Operation\ListDatabases::__construct ( array $options = [])

Constructs a listDatabases command.

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
array$optionsCommand options
Exceptions
InvalidArgumentExceptionfor parameter/option parsing errors

Member Function Documentation

◆ execute()

MongoDB\Operation\ListDatabases::execute ( Server $server)

Execute the operation.

See also
Executable::execute()
Return values
DatabaseInfoIterator
Exceptions
UnexpectedValueExceptionif the command response was malformed
DriverRuntimeExceptionfor other driver errors (e.g. connection errors)

Implements MongoDB\Operation\Executable.


The documentation for this class was generated from the following file: