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

Public Member Functions

 __construct (string $databaseName, array $options=[])
 Constructs a listCollections command.
 
 execute (Server $server)
 Execute the operation.
 

Constructor & Destructor Documentation

◆ __construct()

MongoDB\Operation\ListCollections::__construct ( string $databaseName,
array $options = [] )

Constructs a listCollections command.

Supported options:

  • authorizedCollections (boolean): Determines which collections are returned based on the user privileges.

    For servers < 4.0, 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 collections.
  • maxTimeMS (integer): The maximum amount of time to allow the query to run.
  • session (MongoDB::Driver::Session): Client session.
Parameters
string$databaseNameDatabase name
array$optionsCommand options
Exceptions
InvalidArgumentExceptionfor parameter/option parsing errors

Member Function Documentation

◆ execute()

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

Execute the operation.

See also
Executable::execute()
Return values
CollectionInfoIterator
Exceptions
DriverRuntimeExceptionfor other driver errors (e.g. connection errors)

Implements MongoDB\Operation\Executable.


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