Webiny\Component\Mongo\Bridge\MongoInterface::delete PHP Method

delete() public method

Deletes all documents matching the filter.
See also: http://docs.mongodb.org/manual/reference/command/delete/
public delete ( string $collectionName, array | object $filter, array $options = [] ) : MongoDB\DeleteResult
$collectionName string
$filter array | object Query by which to delete documents
$options array Command options
return MongoDB\DeleteResult
    public function delete($collectionName, $filter, array $options = []);

Usage Example

Example #1
0
 public function delete($collectionName, $filter, array $options = [])
 {
     return $this->bridge->delete($this->cName($collectionName), $filter, $options);
 }