kv_put()
#include <kvstore.h>
kv_error_t
kv_put(kv_store_t *store,
const kv_key_t *key,
const kv_value_t *value,
kv_version_t **new_version)
Writes the key/value pair to the store, inserting or overwriting as appropriate.
This is the simplified version of the function that uses default values for most of put options. For a more complete version that lets you use non-default values, use kv_put_with_options().
Parameters
-
store
The store parameter is the handle to the store where you want to write the key/value pair.
-
key
The key parameter is the key that you want to write to the store. It is created using kv_create_key() or kv_create_key_from_uri().
-
value
The value parameter is the value that you want to write to the store. It is created using kv_create_value().
-
new_version
The new_version parameter references memory into which is copied the key/value pair's new version information. This pointer will be NULL if this function produces a non-zero return code.
You release the resources used by the version data structure using kv_release_version().