Drops specified collection.
@param string $collectionName name of the collection to be dropped.
@return bool whether operation was successful.
511973
public function dropCollection($collectionName)
    {
        $this->document = $this->db->getQueryBuilder()->dropCollection($collectionName);

        $result = current($this->execute()->toArray());
        return $result['ok'] > 0;
    }
761813
public function getCollection($collectionName, array $options = []): Collection
    {
        $cacheKey = $collectionName.$this->getCollectionOptionsHash($options);
        if (!array_key_exists($cacheKey, $this->collectionsCache)) {
            $this->collectionsCache[$cacheKey] = $this->database->selectCollection(
                $collectionName,
                $options
            );
        }

        return $this->collectionsCache[$cacheKey];
    }
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'];
    }
228449
public function drop($key) {
        if (isset($this->pool[$key])) {
            unSet($this->pool[$key]);
            return true;
        }
        return false;
    }
353570
public function delete($key)
    {
        if ($this->has($key)) {
            unset($this->collection[$key]);
            return true;
        }
        return false;
    }
50760
public function dropPrimaryIndex($bucketName)
    {
        $this->beginProfile($token = "    > drop index $bucketName ...");

        $result = $this->db->dropPrimaryIndex($bucketName);

        $this->endProfile($token);

        return $result;
    }
1249156
public function drop($name)
    {
        // check if a valid name and sequence exists
        if (! $name || ! $this->exists($name)) {
            return false;
        }

        return $this->connection->statement("
            declare
                e exception;
                pragma exception_init(e,-02289);
            begin
                execute immediate 'drop sequence {$name}';
            exception
            when e then
                null;
            end;");
    }
889162
public function hasCollection($collection)
    {
        if (empty($this->queriesResultCache[ 'collectionNames' ])) {
            $this->getCollections();
        }

        return (bool)in_array($collection, $this->queriesResultCache[ 'collectionNames' ]);
    }
109704
public function removeItems($eventName)
    {
        if (!isset($this->items[$eventName])) {
            return false;
        }
        
        // Remove the event
        unset($this->items[$eventName]);
        
        // Save the items
        $this->saveItems();
    }
272936
public function getCollection($name)
    {
        $name = strtolower($name);

        if ($this->collections->containsKey($name)) {
            return $this->collections->get($name);
        }

        $this->collections->set($name, $this->createCollection($name));

        return $this->collections->get($name);
    }
812360
public function hasMedia(string $collectionName = 'default'): bool
    {
        return count($this->getMedia($collectionName)) ? true : false;
    }
107016
public function loadMedia(string $collectionName)
    {
        $collection = $this->exists
            ? $this->media
            : collect($this->unAttachedMediaLibraryItems)->pluck('media');

        return $collection
            ->filter(function (Media $mediaItem) use ($collectionName) {
                if ($collectionName == '') {
                    return true;
                }

                return $mediaItem->collection_name === $collectionName;
            })
            ->sortBy('order_column')
            ->values();
    }
963341
public function dropTable(string $tableName): bool
    {
        $this->db->exec(sprintf('DROP TABLE IF EXISTS %s;', $this->quoter->quoteName($tableName)));

        return true;
    }
1293227
public void removeCollection(String collectionName) throws SolrException {
        try {
            CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName);
            request.process(solrClient);
        } catch (SolrServerException | IOException e) {
            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);
        }
    }
652437
public function removeKey($collection, $key) {
        return $this->driver->remove($collection, ['key' => (is_array($key) ? ['$in' => $key] : $key)]);
    }
291235
public function select($collectionName, array $ids)
    {
        $mappedIds = array_map(function ($id) use ($collectionName) {
            return sprintf('%s:%s', $collectionName, $id);
        }, $ids);
        $params = ['foreign_ids' => join(',', $mappedIds)];
        $response = $this->doRequest('GET', 'meta/', $params);
        $body = $response->getBody()->getContents();
        return json_decode($body, 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;
    }