Sokil\Mongo\Collection::deleteDocuments PHP Method

deleteDocuments() public method

Deprecation: since 1.13. Use Collection::batchDelete();
public deleteDocuments ( $expression = [] )
    public function deleteDocuments($expression = array())
    {
        return $this->batchDelete($expression);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Move selected documents to another collection.
  * Dociuments will be removed from source collection only after
  * copying them to target collection.
  *
  * @param type $targetCollectionName
  * @param type $targetDatabaseName Target database name. If not specified - use current
  */
 public function moveToCollection($targetCollectionName, $targetDatabaseName = null)
 {
     // copy to target
     $this->copyToCollection($targetCollectionName, $targetDatabaseName);
     // remove from source
     $this->collection->deleteDocuments($this->expression);
 }
All Usage Examples Of Sokil\Mongo\Collection::deleteDocuments