Operation for the listCollections command.
- Full name:
\MongoDB\Operation\ListCollections
- This class implements:
\MongoDB\Operation\Executable
See Also:
- \MongoDB\Database::listCollections() -
- http://docs.mongodb.org/manual/reference/command/listCollections/ -
private string $databaseName
private \MongoDB\Command\ListCollections $listCollections
Constructs a listCollections command.
public __construct(string $databaseName, array $options = []): mixed
Supported options:
-
authorizedCollections (boolean): Determines which collections are returned based on the user privileges.
For servers < 4.0, this option is ignored.
-
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:
Parameter | Type | Description |
---|---|---|
$databaseName |
string | Database name |
$options |
array | Command options |
Execute the operation.
public execute(\MongoDB\Driver\Server $server): \MongoDB\Model\CollectionInfoIterator
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
\MongoDB\Driver\Server |
See Also:
- \MongoDB\Operation\Executable::execute() -