Skip to content

Latest commit

 

History

History
203 lines (80 loc) · 2.11 KB

DropIndexes.md

File metadata and controls

203 lines (80 loc) · 2.11 KB

DropIndexes

Operation for the dropIndexes command.

See Also:

Properties

databaseName

private string $databaseName

collectionName

private string $collectionName

indexName

private string $indexName

options

private array $options

Methods

__construct

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

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() -

createCommand

Create the dropIndexes command.

private createCommand(): \MongoDB\Driver\Command

createOptions

Create options for executing the command.

private createOptions(): array

See Also: