Couchbase C Client  2.4.4
Remove items from the cluster

Detailed Description

Delete items from the cluster.

Functions

lcb_remove_callback lcb_set_remove_callback (lcb_t, lcb_remove_callback)
 
lcb_error_t lcb_remove (lcb_t instance, const void *command_cookie, lcb_SIZE num, const lcb_remove_cmd_t *const *commands)
 Remove a key from the cluster. More...
 

Typedefs

typedef void(* lcb_remove_callback )(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_remove_resp_t *resp)
 The callback function for a remove request. More...
 

Function Documentation

lcb_error_t lcb_remove ( lcb_t  instance,
const void *  command_cookie,
lcb_SIZE  num,
const lcb_remove_cmd_t *const *  commands 
)

Remove a key from the cluster.

lcb_remove_cmd_t *remove = calloc(1, sizeof(*remove));
remove->version = 0;
remove->v.v0.key = "my-key";
remove->v.v0.nkey = strlen(remove->v.v0.key);
remove->v.v0.cas = 0x666;
lcb_remove_cmd_t* commands[] = { remove };
lcb_remove(instance, NULL, 1, commands);
Parameters
instancethe instance used to batch the requests from
command_cookieA cookie passed to all of the notifications from this command
numthe total number of elements in the commands array
commandsthe array containing the items to remove
Stability
Committed:

Typedef Documentation

typedef void(* lcb_remove_callback)(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_remove_resp_t *resp)

The callback function for a remove request.

Parameters
instancethe instance performing the operation
cookiethe cookie associated with with the command
errorThe status of the operation
respMore information about the operation