4 Key/Value Pair Management Functions
This chapter describes the functions used to manage keys and values. Both are used to describe a single entry (or record) in the KV Store. In addition, this chapter describes functions used to manage versions; that is, data structures that identify the key-value pair's specific version.
Key Functions
| Key Functions | Description |
|---|---|
| kv_create_key() |
Allocate and initialize a key structure using major and minor path components |
| kv_create_key_copy() |
Allocate and initialize a key structure using major and minor path components |
| kv_create_key_from_uri() |
Allocate and initialize a key structure using a URI string |
| kv_create_key_from_uri_copy() |
Allocate and initialize a key structure using a URI string |
| kv_get_key_major() |
Return the major path components for the key |
| kv_get_key_minor() |
Return the minor path components for the key |
| kv_get_key_uri() |
Return the key's major and minor path components as a URI |
| kv_release_key() |
Release the key structure, freeing all associated memory |
Value Functions
| Value Functions | Description |
|---|---|
| kv_create_value() |
Allocate and initialize a value structure |
| kv_create_value_copy() |
Allocate and initialize a value structure |
| kv_get_value() |
Returns the value as a string |
| kv_get_value_size() |
Returns the value's size |
| kv_release_value() |
Release a value structure |
Version Functions
| Version Functions | Description |
|---|---|
| kv_copy_version() |
Copies a version structure |
| kv_get_version() |
Returns a value's version |
| kv_release_version() |
Release a version structure |