dropCollection

suspend fun dropCollection(scopeName: String, collectionName: String, common: CommonOptions = CommonOptions.Default)

Deletes a collection from a scope. Equivalent to:

dropCollection(CollectionSpec(scopeName, collectionName))

WARNING: All documents and indexes in the collection will be lost.

Parameters

scopeName

Name of the collection's parent scope.

collectionName

Name of the collection to drop.

Throws

com.couchbase.client.core.error.ScopeNotFoundException

if the parent scope does not exist.

com.couchbase.client.core.error.CollectionNotFoundException

if there is no collection with this name in the parent scope.


suspend fun dropCollection(collection: CollectionSpec, common: CommonOptions = CommonOptions.Default)

Deletes a collection from a scope.

WARNING: All documents and indexes in the collection will be lost.

Parameters

collection

Specifies the collection to drop.

Throws

com.couchbase.client.core.error.ScopeNotFoundException

if the parent scope does not exist.

com.couchbase.client.core.error.CollectionNotFoundException

if there is no collection with this name in the parent scope.