libyrmcds
memcached/yrmcds client library for C
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
yrmcds_error yrmcds_decr2 ( yrmcds c,
const char *  key,
size_t  key_len,
uint64_t  value,
uint64_t  initial,
uint32_t  expire,
int  quiet,
uint32_t *  serial 
)

Send Decrement/DecrementQ command.

Parameters
cA pointer to yrmcds.
keyKey data.
key_lenLength of key.
valueAmount to add.
initialInitial value used when key does not exist.
expireExpiration time. 0 disables expiration.
quiet0 to send Decrement, other values to send DecrementQ.
serialA pointer to uint32_t, or NULL.
Returns
0 if succeeded. Other values indicate an error.

This function sends Decrement/DecrementQ command to the server. Unlike yrmcds_decr(), this function creates a new object with initial and expire when key is not found.

If serial is not NULL, the serial number of the request will be stored if the command was sent successfully.