kv_delete_with_options()

#include <kvstore.h>

kv_error_t 
kv_delete_with_options(kv_store_t *store,
                       const kv_key_t *key,
                       const kv_version_t *if_version,
                       kv_value_t **previous_value,
                       kv_return_value_version_enum return_info,
                       kv_durability_t durability,
                       kv_timeout_t timeout_ms) 

Delete the key/value pair associated with the key.

Deleting a key/value pair with this method does not automatically delete its children or descendant key/value pairs. To delete children or descendants, use kv_multi_delete() instead.

Possible outcomes when calling this method are:

Parameters

store

The store parameter is the handle to the store in which you want to perform the delete operation.

key

The key parameter is the key used to look up the key/value pair to be deleted.

if_version

The if_version parameter indicates the Version that the record must match before it can be deleted. The Version is obtained using the kv_get_version() function.

previous_value

The previous_value parameter references memory into which is copied the Value portion of the Key/Value pair that this function deleted.

return_info

The return_info parameter indicates what information should be returned to the kv_execute() results list by this operation. See kv_return_value_version_enum for a description of the options accepted by this parameter.

durability

The durability parameter provides the durability guarantee to be used with this delete operation. Durability guarantees are created using kv_create_durability().

timeout_ms

The timeout_ms parameter provides an upper bound on the time interval for processing the operation. A best effort is made not to exceed the specified limit. If zero, the default request timeout is used. The default request timeout is set using kv_config_set_timeouts().

See Also

Data Operations and Related Functions