当前位置: 首页>>代码示例>>PHP>>正文


PHP MongoCollection::deleteIndexes方法代码示例

本文整理汇总了PHP中MongoCollection::deleteIndexes方法的典型用法代码示例。如果您正苦于以下问题:PHP MongoCollection::deleteIndexes方法的具体用法?PHP MongoCollection::deleteIndexes怎么用?PHP MongoCollection::deleteIndexes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MongoCollection的用法示例。


在下文中一共展示了MongoCollection::deleteIndexes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: eliminarIndicesATablaTemporal

 function eliminarIndicesATablaTemporal($TABLA)
 {
     try {
         $DB = $this->CONEXION->innet;
         $COLECCION = new MongoCollection($DB, "temporal" . $TABLA);
         $COLECCION->deleteIndexes();
     } catch (Exception $e) {
         $this->LOG->registraLog("Generica", $e->getMessage(), "No es posible crear un indice " . $TABLA);
         return false;
     }
     return $DATOS["_id"];
 }
开发者ID:rauldolores,项目名称:Inova-360-Website,代码行数:12,代码来源:Generica.php

示例2: testDeleteIndexes

 public function testDeleteIndexes()
 {
     $idx = $this->object->db->selectCollection('system.indexes');
     $this->object->ensureIndex(array('foo' => 1));
     $this->object->ensureIndex(array('foo' => -1));
     $this->object->ensureIndex(array('bar' => 1, 'baz' => -1));
     $num = iterator_count($idx->find(array('ns' => 'phpunit.c')));
     $this->assertEquals($num, 4);
     $this->object->deleteIndexes();
     $num = iterator_count($idx->find(array('ns' => 'phpunit.c')));
     $this->assertEquals($num, 1);
 }
开发者ID:salathe,项目名称:mongo-php-driver,代码行数:12,代码来源:MongoCollectionTest.php

示例3: deleteIndexes

 /**
  * Wrapper method for MongoCollection::deleteIndexes().
  *
  * @see http://php.net/manual/en/mongocollection.deleteindexes.php
  * @return array
  */
 public function deleteIndexes()
 {
     return $this->mongoCollection->deleteIndexes();
 }
开发者ID:pmnyaga,项目名称:mongodb,代码行数:10,代码来源:Collection.php

示例4: MongoClient

<?php

error_reporting(E_ALL);
// connect
$m = new MongoClient();
// select a database
$db = $m->selectDB('trend');
// select a collection (analogous to a relational database's table)
$colnames = ['housesale', 'aptsale', 'flatsale', 'houserent', 'aptrent', 'flatrent'];
foreach ($colnames as $colname) {
    echo "Removing {$colname}...\n";
    $col = new MongoCollection($db, $colname);
    $col->drop();
    $col->deleteIndexes();
    $col2name = $colname . "_agg";
    $col2 = new MongoCollection($db, $col2name);
    $col2->drop();
    $col2->deleteIndexes();
}
开发者ID:hunkim,项目名称:kproperty,代码行数:19,代码来源:clear_all.php

示例5: deleteIndexes

 /**
  * deleteIndexes.
  */
 public function deleteIndexes()
 {
     $this->time->start();
     $return = parent::deleteIndexes();
     $time = $this->time->stop();
     $this->log(array('type' => 'deleteIndexes', 'time' => $time));
     return $return;
 }
开发者ID:hybr,项目名称:jpm,代码行数:11,代码来源:LoggableMongoCollection.php

示例6: dropIndexes

 /**
  * @return array
  */
 public function dropIndexes()
 {
     return $this->collection->deleteIndexes();
 }
开发者ID:pasechnik,项目名称:mongozend,代码行数:7,代码来源:MongoGateway.php


注:本文中的MongoCollection::deleteIndexes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。