Phalcon\Db\Adapter\MongoDB\Collection::deleteOne PHP Метод

deleteOne() публичный Метод

Deletes at most one document matching the filter.
См. также: DeleteOne::__construct() for supported options
См. также: http://docs.mongodb.org/manual/reference/command/delete/
public deleteOne ( array | object $filter, array $options = [] ) : DeleteResult
$filter array | object Query by which to delete documents
$options array Command options
Результат DeleteResult
    public function deleteOne($filter, array $options = [])
    {
        if (!isset($options['writeConcern'])) {
            $options['writeConcern'] = $this->writeConcern;
        }
        $operation = new DeleteOne($this->databaseName, $this->collectionName, $filter, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }