Couchbase C Client  2.10.7
Asynchronous C Client for Couchbase

Detailed Description

Clear the contents of a bucket.

Flush is useful for development environments (for example clearing a bucket before running tests).

Functions

lcb_error_t lcb_cbflush3 (lcb_t instance, const void *cookie, const lcb_CMDCBFLUSH *cmd)
 
lcb_error_t lcb_flush3 (lcb_t instance, const void *cookie, const lcb_CMDFLUSH *cmd)
 

Typedefs

typedef lcb_CMDBASE lcb_CMDCBFLUSH
 
typedef lcb_RESPBASE lcb_RESPCBFLUSH
 
typedef lcb_CMDBASE lcb_CMDFLUSH
 
typedef lcb_RESPSERVERBASE lcb_RESPFLUSH
 

Function Documentation

◆ lcb_cbflush3()

lcb_error_t lcb_cbflush3 ( lcb_t  instance,
const void *  cookie,
const lcb_CMDCBFLUSH cmd 
)
Stability
Uncommitted:

Flush a bucket This function will properly flush any type of bucket using the REST API via HTTP. This may be used in a manner similar to the older lcb_flush3().

The callback invoked under LCB_CALLBACK_CBFLUSH will be invoked with either a success or failure status depending on the outcome of the operation. Note that in order for lcb_cbflush3() to succeed, flush must already be enabled on the bucket via the administrative interface.

Parameters
instancethe library handle
cookiethe cookie passed in the callback
cmdempty command structure. Currently there are no options for this command.
Returns
status code for scheduling.
Attention
Because this command is built using HTTP, this is not subject to operation pipeline calls such as lcb_sched_enter()/lcb_sched_leave()

◆ lcb_flush3()

lcb_error_t lcb_flush3 ( lcb_t  instance,
const void *  cookie,
const lcb_CMDFLUSH cmd 
)