Data Operations Data Types
This section defines the data types used by the functions described in this appendix.
kv_depth_enum
typedef enum {
    KV_DEPTH_DEFAULT = 0,
    KV_DEPTH_CHILDREN_ONLY,
    KV_DEPTH_DESCENDANTS_ONLY,
    KV_DEPTH_PARENT_AND_CHILDREN,
    KV_DEPTH_PARENT_AND_DESCENDANTS
} kv_depth_enum; Used with multiple-key and iterator operations to specify whether to select (return or operate on) the key-value pair for the parent key, and the key-value pairs for only immediate children or all descendants.
Options are:
- 
                           KV_DEPTH_DEFAULTNo depth constraints are placed on the operation. 
- 
                           KV_DEPTH_CHILDREN_ONLYSelect only immediate children, do not select the parent. 
- 
                           KV_DEPTH_DESCENDANTS_ONLYSelect all descendants, do not select the parent. 
- 
                           KV_DEPTH_PARENT_AND_CHILDRENSelect immediate children and the parent. 
- 
                           KV_DEPTH_PARENT_AND_DESCENDANTSSelect all descendants and the parent. 
kv_direction_enum
typedef enum {
    KV_DIRECTION_FORWARD,
    KV_DIRECTION_REVERSE,
    KV_DIRECTION_UNORDERED
} kv_direction_enum; Used with iterator operations to specify the order that keys are returned.
- 
                           KV_DIRECTION_FORWARDIterate in ascending key order. 
- 
                           KV_DIRECTION_REVERSEIterate in descending key order. 
- 
                           KV_DIRECTION_UNORDEREDIterate in no particular key order. 
kv_presence_enum
typedef enum {
    KV_IF_DONTCARE = 0,
    KV_IF_ABSENT,
    KV_IF_PRESENT
} kv_presence_enum; Defines under what circumstances a Key/Value record will be put into the store if kv_put_with_options() is in use.
- 
                           KV_IF_DONTCAREThe record is put into the store without constraint. 
- 
                           KV_IF_ABSENTPut the record into the store only if a value for the the supplied key does not currently exist in the store. 
- 
                           KV_IF_PRESENTPut the record into the store only if a value for the supplied key does currently exist in the store. 
kv_return_value_version_enum
typedef enum {
    KV_RETURN_VALUE_NONE = 0,
    KV_RETURN_VALUE_ALL,
    KV_RETURN_VALUE_VALUE,
    KV_RETURN_VALUE_VERSION
} kv_return_value_version_enum; Used with put and delete operations to define what to return as part of the operations.
- 
                           KV_RETURN_VALUE_NONEDo not return the value or the version. 
- 
                           KV_RETURN_VALUE_ALLReturn both the value and the version. 
- 
                           KV_RETURN_VALUE_VALUEReturn the value only. 
- 
                           KV_RETURN_VALUE_VERSIONReturn the version only.