Operation for the dropIndexes command.
- Full name:
\MongoDB\Operation\DropIndexes
- This class implements:
\MongoDB\Operation\Executable
See Also:
- \MongoDB\Collection::dropIndexes() -
- http://docs.mongodb.org/manual/reference/command/dropIndexes/ -
private string $databaseName
private string $collectionName
private string $indexName
private array $options
Constructs a dropIndexes command.
public __construct(string $databaseName, string $collectionName, string $indexName, array $options = []): mixed
Supported options:
-
maxTimeMS (integer): The maximum amount of time to allow the query to run.
-
session (MongoDB\Driver\Session): Client session.
-
typeMap (array): Type map for BSON deserialization. This will be used for the returned command result document.
-
writeConcern (MongoDB\Driver\WriteConcern): Write concern.
Parameters:
Parameter | Type | Description |
---|---|---|
$databaseName |
string | Database name |
$collectionName |
string | Collection name |
$indexName |
string | Index name (use "*" to drop all indexes) |
$options |
array | Command options |
Execute the operation.
public execute(\MongoDB\Driver\Server $server): array|object
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
\MongoDB\Driver\Server |
Return Value:
Command result document
See Also:
- \MongoDB\Operation\Executable::execute() -
Create the dropIndexes command.
private createCommand(): \MongoDB\Driver\Command
Create options for executing the command.
private createOptions(): array
See Also: