Wraps @see \MongoDB\Driver\BulkWrite::delete().

@param array|object $filter
@param array $options
166646
public function delete($filter, array $options = [])
    {
        $this->ensureAllowedMethodCall(__METHOD__);

        if (isset($options['collation']) && !$this->server->supportsCollation()) {
            throw new UnsupportedException(
                'Option "collation" is not supported by the server.'
            );
        }

        if (null !== $this->listener) {
            $this->listener->beforeDelete($filter, $options);
        }

        $this->getWrappedBulk()->delete($filter, $options);
        $this->currentPosition += 1;
    }
745696
public function delete($files, array $options = [])
    {
        collect(array_wrap($options))->each(function ($file) {
            Storage::delete(sprintf('%s/%s', $this->uploadFolder, array_get($file, 'filename')));
        });

        return response()->json('Files deleted', 200);
    }
1259815
public function delete($customField, $params = array(), $options = array())
    {
        $path = sprintf("/custom_fields/%s", $customField);
        return $this->client->delete($path, $params, $options);
    }
986223
public function del($filter) {
		$query = $this->newDelete();
		if ($filter !== true) {
			if (is_string($filter) || is_numeric($filter)) {
				$query->where(field($this->_primary_key)->eq($filter));
			} elseif (!is_array($filter) || count($filter) === 0) {
				throw new DBException("Filter can not be empty");
			} else {
				foreach ($filter as $k => $v) {
					$query->andWhere(field($k)->eq($v));
				}
			}
		}
		return $this->execute($query);
	}
431331
public function findOneAndDelete(array $filter, array $options = [])
    {
        $options = ['remove' => true] + FindOneAndDeleteResolver::resolveStatic($options);

        return $this->findAndModify($filter, $options);
    }
1121920
public function delete($id, $filter = null)
    {
        if (empty($id)) {
            throw new StorageException('Invalid id parameter.');
        }

        if (!$filter) {
            $filter = [];
        }

        $filter[self::DIAGNOSTIC_ID] = $id;

        try {
            \common_Logger::i('Deleting diagnostic result ' . $id);
            $query = 'DELETE FROM ' . self::DIAGNOSTIC_TABLE;
            return (boolean) $this->query($query, $filter)->rowCount();
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
1237347
public function deleteOne($document, $options = [])
    {
        $query = new DeleteOne($this->documentManager, $this, $document, $options);
        if (isset($options['getQuery']) && $options['getQuery']) {
            return $query;
        } else {
            return $query->execute();
        }
    }
601623
public function deleteFile(array $options)
    {
        if (!isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileName'] = $file->getName();
        }

        if (!isset($options['FileId']) && isset($options['BucketName']) && isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileId'] = $file->getId();
        }

        try {
            $this->generateAuthenticatedClient([
                'fileName' => $options['FileName'],
                'fileId'   => $options['FileId'],
            ])->request('POST', '/b2_delete_file_version');
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
499090
public function addFilter($filterName, $options = [])
    {
        // Create the filter hash so we can run multiple versions of the same filter
        $filterHash = sprintf('%s_%s', strtolower($filterName), md5(json_encode($options)));

        // Add the filter
        $this->options['filters'][$filterHash] = [
            'filter'  => strtolower($filterName),
            'options' => $options,
        ];

        unset($filterHash);

        return $this;
    }
802080
public function replaceOne(array $filter, $replacement, array $options = [])
    {
        list($bulkOptions, $options) = self::extractBulkWriteOptions($options);
        $model = new ReplaceOne($filter, $replacement, $options);

        $bulkWriteResult = $this->bulkWrite([$model], $bulkOptions);

        return new UpdateResult($bulkWriteResult);
    }
864221
public function updateMany(array $filter, $update, array $options = [])
    {
        list($bulkOptions, $options) = self::extractBulkWriteOptions($options);
        $model = new UpdateMany($filter, $update, $options);

        $bulkWriteResult = $this->bulkWrite([$model], $bulkOptions);

        return new UpdateResult($bulkWriteResult);
    }
208616
public function delete(Closure $filter)
    {
        $collectionData = $this->storage->load(true);
        if (!isset($collectionData['items'])) {
            $collectionData['items'] = [];
        }
        $items = &$collectionData['items'];

        foreach ($items as $k => $item) {
            if ($filter($item)) {
                unset($items[$k]);
            }
        }
        $this->storage->save($collectionData);
    }
519018
public function has($key, $filter, $options = null) {
		if (is_string($filter))
			$filter=array($filter);
		if (is_int(strpos($key,'.'))) {
			list($key,$fkey) = explode('.',$key,2);
			if (!isset($this->hasCond[$key.'.']))
				$this->hasCond[$key.'.'] = array();
			$this->hasCond[$key.'.'][$fkey] = array($filter,$options);
		} else {
			if (!isset($this->fieldConf[$key]))
				trigger_error(sprintf(self::E_UNKNOWN_FIELD,$key,get_called_class()),E_USER_ERROR);
			if (!isset($this->fieldConf[$key]['relType']))
				trigger_error(self::E_HAS_COND,E_USER_ERROR);
			$this->hasCond[$key] = array($filter,$options);
		}
		return $this;
	}
1100325
public function find(array $filter = [], array $options = [])
    {
        $options += ['typeMap' => $this->typeMap];
        $options = QueryOptionsResolver::resolveStatic($options);
        $typeMap = $options['typeMap'];
        unset($options['typeMap']);

        if (isset($options['readPreference'])) {
            $readPreference = $options['readPreference'];
            unset($options['readPreference']);
        } else {
            $readPreference = $this->readPreference;
        }

        $query = new Query($filter, $options);
        $query->setDefaultReadConcern($this->readConcern);

        $cursor = $this->manager->executeQuery(
            $this->getNamespace(),
            $query,
            $readPreference
        );

        $cursor->setTypeMap($typeMap);

        return $cursor;
    }
1169402
public function delete($url, $data = [], array $options = [])
    {
        $options = $this->_mergeOptions($options);
        $url = $this->buildUrl($url, [], $options);

        return $this->_doRequest(Request::METHOD_DELETE, $url, $data, $options);
    }
317697
public function filter($field, $filter, array $options = []) {
        if (!in_array($filter, [self::HTML, self::NEWLINES, self::WHITESPACE, self::XSS])) {
            throw new InvalidArgumentException(sprintf('Filter %s does not exist', $filter));
        }

        $this->_filters[$field][$filter] = $options;

        return $this;
    }
199646
public function updateOne(array $filter, array $update, array $options = [])
    {
        $this->writeModels[] = [BulkWrite::UPDATE_ONE => [$filter, $update, $options]];

        return $this;
    }