Skip to content

Latest commit

 

History

History
216 lines (88 loc) · 2.34 KB

ListIndexes.md

File metadata and controls

216 lines (88 loc) · 2.34 KB

ListIndexes

Operation for the listIndexes command.

See Also:

Properties

errorCodeDatabaseNotFound

private static int $errorCodeDatabaseNotFound
  • This property is static.

errorCodeNamespaceNotFound

private static int $errorCodeNamespaceNotFound
  • This property is static.

databaseName

private string $databaseName

collectionName

private string $collectionName

options

private array $options

Methods

__construct

Constructs a listIndexes command.

public __construct(string $databaseName, string $collectionName, array $options = []): mixed

Supported options:

  • maxTimeMS (integer): The maximum amount of time to allow the query to run.

  • session (MongoDB\Driver\Session): Client session.

Parameters:

Parameter Type Description
$databaseName string Database name
$collectionName string Collection name
$options array Command options

execute

Execute the operation.

public execute(\MongoDB\Driver\Server $server): \MongoDB\Model\IndexInfoIterator

Parameters:

Parameter Type Description
$server \MongoDB\Driver\Server

See Also:

  • \MongoDB\Operation\Executable::execute() -

createOptions

Create options for executing the command.

private createOptions(): array

Note: read preference is intentionally omitted, as the spec requires that the command be executed on the primary.

See Also:


executeCommand

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

private executeCommand(\MongoDB\Driver\Server $server): \MongoDB\Model\IndexInfoIteratorIterator

Parameters:

Parameter Type Description
$server \MongoDB\Driver\Server