Documentation

DropIndexes
in package
implements Executable

Operation for the dropIndexes command.

Tags
see
Collection::dropIndexes()
see
http://docs.mongodb.org/manual/reference/command/dropIndexes/

Interfaces, Classes, Traits and Enums

Executable

Table of Contents

$collectionName  : string
$databaseName  : string
$indexName  : string
$options  : array<string|int, mixed>
__construct()  : mixed
Constructs a dropIndexes command.
execute()  : array<string|int, mixed>|object
Execute the operation.
createCommand()  : Command
Create the dropIndexes command.
createOptions()  : array<string|int, mixed>
Create options for executing the command.

Properties

Methods

__construct()

Constructs a dropIndexes command.

public __construct(string $databaseName, string $collectionName, string $indexName[, array<string|int, mixed> $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
$databaseName : string

Database name

$collectionName : string

Collection name

$indexName : string

Index name (use "*" to drop all indexes)

$options : array<string|int, mixed> = []

Command options

Tags
throws
InvalidArgumentException

for parameter/option parsing errors

Return values
mixed

execute()

Execute the operation.

public execute(Server $server) : array<string|int, mixed>|object
Parameters
$server : Server
Tags
see
Executable::execute()
throws
UnsupportedException

if write concern is used and unsupported

throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
array<string|int, mixed>|object

Command result document

createCommand()

Create the dropIndexes command.

private createCommand() : Command
Return values
Command

Search results