Phalcon\Db\Adapter\MongoDB\Operation\CreateIndexes::executeLegacy PHP Метод

executeLegacy() приватный Метод

Create one or more indexes for the collection by inserting into the "system.indexes" collection (MongoDB <2.6).
private executeLegacy ( MongoDB\Driver\Server $server )
$server MongoDB\Driver\Server
    private function executeLegacy(Server $server)
    {
        $bulk = new Bulk(['ordered' => true]);
        foreach ($this->indexes as $index) {
            $bulk->insert($index);
        }
        $server->executeBulkWrite($this->databaseName . '.system.indexes', $bulk, new WriteConcern(1));
    }