PHP Class Phalcon\Db\Adapter\MongoDB\Operation\ListIndexes

See also: MongoDB\Collection::listIndexes()
See also: http://docs.mongodb.org/manual/reference/command/listIndexes/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Show file Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__construct ( string $databaseName, string $collectionName, array $options = [] ) Constructs a listIndexes command.
execute ( MongoDB\Driver\Server $server ) : Phalcon\Db\Adapter\MongoDB\Model\IndexInfoIterator Execute the operation.

Private Methods

Method Description
executeCommand ( MongoDB\Driver\Server $server ) : IndexInfoIteratorIterator Returns information for all indexes for this collection using the listIndexes command.
executeLegacy ( MongoDB\Driver\Server $server ) : IndexInfoIteratorIterator Returns information for all indexes for this collection by querying the "system.indexes" collection (MongoDB <3.0).

Method Details

__construct() public method

Supported options: * maxTimeMS (integer): The maximum amount of time to allow the query to run.
public __construct ( string $databaseName, string $collectionName, array $options = [] )
$databaseName string Database name
$collectionName string Collection name
$options array Command options

execute() public method

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : Phalcon\Db\Adapter\MongoDB\Model\IndexInfoIterator
$server MongoDB\Driver\Server
return Phalcon\Db\Adapter\MongoDB\Model\IndexInfoIterator