Remove the data from the collection

@param  string $collectionName
@param  array  $criteria
@param  array  $options
@return bool
187853
public function remove($collectionName, array $criteria = [], array $options = []) {
		$collection = $this->getCollection($collectionName);
		
		if ($this->_profilerEnabled) {
			$message = 'db.remove(' . json_encode($criteria) . ');';
			$event   = $this->getProfiler()->startDelete($message);
		}

		$result  = $collection->remove($criteria, $options);
		$success = (bool) $result['ok'];
		
		if ($this->_profilerEnabled) {
			$success
				? $event->stopSuccess()
				: $event->stopError();
		}
		
		return $success;
	}
725061
public function remove($selector, $name = true, $options = null)
    {
        if (!array_key_exists($selector, $this->rules)) {
            return $this;
        }
        /* @var $collection \Sirius\Validation\ValueValidator */
        $collection = $this->rules[$selector];
        $collection->remove($name, $options);

        return $this;
    }
567612
public function delete($collectionName, $condition, $options = [])
    {
        $batchOptions = [];
        foreach (['bypassDocumentValidation'] as $name) {
            if (isset($options[$name])) {
                $batchOptions[$name] = $options[$name];
                unset($options[$name]);
            }
        }

        $this->document = [];
        $this->addDelete($condition, $options);
        $result = $this->executeBatch($collectionName, $batchOptions);

        return $result['result'];
    }
90619
public function createCollection($name, array $options = null)
    {
        $classDefinition = $this->getCollectionDefinition($name);
        
        if (!empty($options)) {
            $classDefinition->merge($options);
        }

        $mongoCollection = $this->getMongoDB()->createCollection(
            $name,
            $classDefinition->getMongoCollectionOptions()
        );

        // create collection
        $className = $classDefinition->getClass();
        return new $className(
            $this,
            $mongoCollection,
            $classDefinition
        );
    }
802545
public function deleteDocument($collection, $id, array $options = [])
    {
        $this->setOptions($options);
        $doc = new Document($this->client, $this->database, $collection);
        $doc->setHeaders($this->getHeaders());
        $rs = $doc->delete($id);
        $this->checkResponse($rs);
        unset($rs['_curl_info']);

        return $rs;
    }
966353
protected function _delete(array $criteria = array())
    {
        if (!is_null($this->_table)) {
            $this->_affectedRows = $this->_db->delete($this->_table, $criteria);
            return $this->_affectedRows;
        }
    }
29111
public function find($collectionName, $condition, $options = [])
    {
        $queryBuilder = $this->db->getQueryBuilder();

        $this->document = $queryBuilder->buildCondition($condition);

        if (isset($options['projection'])) {
            $options['projection'] = $queryBuilder->buildSelectFields($options['projection']);
        }

        if (isset($options['sort'])) {
            $options['sort'] = $queryBuilder->buildSortFields($options['sort']);
        }

        if (array_key_exists('limit', $options)) {
            if ($options['limit'] === null || !ctype_digit((string) $options['limit'])) {
                unset($options['limit']);
            } else {
                $options['limit'] = (int)$options['limit'];
            }
        }
        if (array_key_exists('skip', $options)) {
            if ($options['skip'] === null || !ctype_digit((string) $options['skip'])) {
                unset($options['skip']);
            } else {
                $options['skip'] = (int)$options['skip'];
            }
        }

        return $this->query($collectionName, $options);
    }
600191
public function delete($id, array $options = []) {
        return $this->query(Query::DELETE)
            ->where($this->getPrimaryKey(), $id)
            ->save([], $options);
    }
490299
public function findFirst($collectionName, array $criteria = [], array $fields = []) {
		$collection = $this->getCollection($collectionName);
		
		if ($this->_profilerEnabled) {
			$message = 'db.' . $collectionName . '.findOne(';

			if (empty($criteria)) {
				$message .= ');';
			} else {
				$message .= json_encode($criteria) . ');';
			}

			$event = $this->getProfiler()->startRead($message);
		}

		$result = $collection->findOne($criteria, $fields);

		if ($this->_profilerEnabled) {
			$event->stopSuccess();
		}

		return $result;
	}
629343
public function delete(EntityInterface $resource, $options = [])
    {
        return (bool)$this->query()->delete()->where([
            $this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
        ])->execute();
    }
1342106
public function delete($collectionName, $id)
    {

        $response = $this->doRequest('DELETE', 'collections/' . $collectionName . '/' . $id . '/');
        $body = $response->getBody()->getContents();
        return json_decode($body, true);
    }
1321247
public function delete($options = array())
    {
        $this->__preDelete();

        if ($this->_exist) {
            $deleted =  $this->_connection->remove($this->collectionName(), array("_id" => $this->getId() ), $options);
            if ($deleted) {
                $this->_exist = false;
            }
        }
        $this->__postDelete();

        return true;
    }
927895
public function removeCriteria($criteriaName = '')
    {
        if (!empty($criteriaName)) {
            $this->stack = $this->stack->filter(function (CriteriaInterface $criteria) use ($criteriaName) {
                return !is_a($criteria, $criteriaName);
            });

            return true;
        }

        $this->stack = new Collection();

        return true;
    }
1224430
public function deleteMany(array $filter, array $options = [])
    {
        list($bulkOptions, $options) = self::extractBulkWriteOptions($options);
        $model = new DeleteMany($filter, $options);
        $bulkWriteResult = $this->bulkWrite([$model], $bulkOptions);

        return new DeleteResult($bulkWriteResult);
    }
370445
public function selectCollection($name, array $options = [])
    {
        if (!isset($this->collections[$name])) {
            $this->createCollection($name);
        }
        return $this->collections[$name]['collection'];
    }
386006
protected function doCreateCollection($name, array $options)
    {
        $this->mongoDB->createCollection($name, $options);

        return $this->doSelectCollection($name);
    }
1260852
private function deleteElements(PersistentCollection $coll, array $options)
    {
        $deleteDiff = $coll->getDeleteDiff();

        if (empty($deleteDiff)) {
            return;
        }

        list($propertyPath, $parent) = $this->getPathAndParent($coll);

        $query = array('$unset' => array());

        foreach ($deleteDiff as $key => $document) {
            $query['$unset'][$propertyPath . '.' . $key] = true;
        }

        $this->executeQuery($parent, $query, $options);

        /**
         * @todo This is a hack right now because we don't have a proper way to
         * remove an element from an array by its key. Unsetting the key results
         * in the element being left in the array as null so we have to pull
         * null values.
         */
        $this->executeQuery($parent, array('$pull' => array($propertyPath => null)), $options);
    }