flush Bucket
suspend fun flushBucket(bucketName: String, common: CommonOptions = CommonOptions.Default)
Content copied to clipboard
Removes all documents from a bucket.
Flush must be enabled on the bucket in order to perform this operation. Enabling flush is not recommended in a production cluster, as it increases the chance of accidental data loss.
Keep in mind that flush is not an atomic operation. The server will need some time to clean the partitions out completely. If an integration test scenario requires isolation, creating individual buckets might provide better results.
Throws
com. couchbase. client. core. error. Bucket Not Found Exception
if the specified bucket does not exist.
com. couchbase. client. core. error. Bucket Not Flushable Exception
if flush is not enabled on the bucket.