PHP Класс Phalcon\Db\Adapter\MongoDB\Operation\CreateIndexes

См. также: MongoDB\Collection::createIndex()
См. также: MongoDB\Collection::createIndexes()
См. также: http://docs.mongodb.org/manual/reference/command/createIndexes/
Наследование: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $databaseName, string $collectionName, array $indexes ) Constructs a createIndexes command.
execute ( MongoDB\Driver\Server $server ) : string[] Execute the operation.

Приватные методы

Метод Описание
executeCommand ( MongoDB\Driver\Server $server ) Create one or more indexes for the collection using the createIndexes command.
executeLegacy ( MongoDB\Driver\Server $server ) Create one or more indexes for the collection by inserting into the "system.indexes" collection (MongoDB <2.6).

Описание методов

__construct() публичный метод

Constructs a createIndexes command.
public __construct ( string $databaseName, string $collectionName, array $indexes )
$databaseName string Database name
$collectionName string Collection name
$indexes array List of index specifications

execute() публичный метод

For servers < 2.6, this will actually perform an insert operation on the database's "system.indexes" collection.
См. также: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : string[]
$server MongoDB\Driver\Server
Результат string[] The names of the created indexes