DropIndexes
in package
FinalYes
Operation for the dropIndexes command.
Tags
Table of Contents
Properties
- $collectionName : string
- $databaseName : string
- $indexName : string
- $options : array<string|int, mixed>
Methods
- __construct() : mixed
- Constructs a dropIndexes command.
- execute() : void
- Execute the operation.
- createCommand() : Command
- Create the dropIndexes command.
- createOptions() : array<string|int, mixed>
- Create options for executing the command.
Properties
$collectionName
private
string
$collectionName
$databaseName
private
string
$databaseName
$indexName
private
string
$indexName
$options
private
array<string|int, mixed>
$options
= []
Methods
__construct()
Constructs a dropIndexes command.
public
__construct(string $databaseName, string $collectionName, string $indexName[, array<string|int, mixed> $options = [] ]) : mixed
Supported options:
-
comment (mixed): BSON value to attach as a comment to this command.
This is not supported for servers versions < 4.4.
-
maxTimeMS (integer): The maximum amount of time to allow the query to run.
-
session (MongoDB\Driver\Session): Client session.
-
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
execute()
Execute the operation.
public
execute(Server $server) : void
Parameters
- $server : Server
Tags
createCommand()
Create the dropIndexes command.
private
createCommand() : Command
Return values
CommandcreateOptions()
Create options for executing the command.
private
createOptions() : array<string|int, mixed>