updateCollection

@SinceCouchbase(value = "7.2")
suspend fun updateCollection(scopeName: String, collectionName: String, common: CommonOptions = CommonOptions.Default, @SinceCouchbase(value = "7.6") maxExpiry: Duration? = null, history: Boolean? = null)

Modifies an existing collection.

Parameters

scopeName

Name of the parent scope. This scope must already exist.

collectionName

Name of the collection to update. This collection must already exist.

maxExpiry

New value for the maximum expiry for documents in the collection. Pass null to leave unmodified. Pass Duration.ZERO to have the collection's max expiry always be the same as the bucket's max expiry. If using Couchbase Server 7.6 or later, pass CollectionSpec.NEVER_EXPIRE (or -1 seconds) to have documents in the collection never expire, regardless of the bucket's max expiry.

history

New value for history preservation for this collection, or null to leave unmodified.

Throws