Documentation

ListIndexes
in package
implements Executable

Operation for the listIndexes command.

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

Interfaces, Classes, Traits and Enums

Executable

Table of Contents

$collectionName  : string
$databaseName  : string
$errorCodeDatabaseNotFound  : int
$errorCodeNamespaceNotFound  : int
$options  : array<string|int, mixed>
__construct()  : mixed
Constructs a listIndexes command.
execute()  : IndexInfoIterator
Execute the operation.
createOptions()  : array<string|int, mixed>
Create options for executing the command.
executeCommand()  : IndexInfoIteratorIterator
Returns information for all indexes for this collection using the listIndexes command.

Properties

$errorCodeDatabaseNotFound

private static int $errorCodeDatabaseNotFound = 60

$errorCodeNamespaceNotFound

private static int $errorCodeNamespaceNotFound = 26

Methods

__construct()

Constructs a listIndexes command.

public __construct(string $databaseName, string $collectionName[, 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.

Parameters
$databaseName : string

Database name

$collectionName : string

Collection name

$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) : IndexInfoIterator
Parameters
$server : Server
Tags
see
Executable::execute()
throws
RuntimeException

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

Return values
IndexInfoIterator

executeCommand()

Returns information for all indexes for this collection using the listIndexes command.

private executeCommand(Server $server) : IndexInfoIteratorIterator
Parameters
$server : Server
Tags
throws
RuntimeException

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

Return values
IndexInfoIteratorIterator

Search results