See also: MongoDB\Collection::drop()
See also: MongoDB\Database::dropCollection()
See also: http://docs.mongodb.org/manual/reference/command/drop/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Ejemplo n.º 1
0
 /**
  * Drop this collection.
  *
  * @see DropCollection::__construct() for supported options
  *
  * @param array $options Additional options
  *
  * @return array|object Command result document
  */
 public function drop(array $options = [])
 {
     if (!isset($options['typeMap'])) {
         $options['typeMap'] = $this->typeMap;
     }
     $operation = new DropCollection($this->databaseName, $this->collectionName, $options);
     $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
     return $operation->execute($server);
 }