C API  19.3.0
Oracle NoSQL Database C Client
Field range

Functions

kv_error_t kv_create_field_range (const char *field_name, const char *start, kv_boolean_t start_inclusive, const char *end, kv_boolean_t end_inclusive, kv_field_range_t **rangep)
 Creates a range of values to be used in a table or index iteration or multiGet operation. More...
 
void kv_release_field_range (kv_field_range_t **rangep)
 Releases the resources used by the field range handle. More...
 

Detailed Description

Field range defines a range of values to be used in a table or index iteration or multiGet operation. A field range is used as the least significant component in a partially specified PrimaryKey or IndexKey in order to create a value range for an operation that returns multiple rows or keys.

Function Documentation

kv_error_t kv_create_field_range ( const char *  field_name,
const char *  start,
kv_boolean_t  start_inclusive,
const char *  end,
kv_boolean_t  end_inclusive,
kv_field_range_t **  rangep 
)

Creates a range of values to be used in a table or index iteration or multiGet operation.

Note
Regardless the type of the field, the start and end arguments requires string version of value.
Parameters
[in]field_nameThe name of the field from the PrimaryKey or IndexKey to use for the range, it is copied and stored in the field range handle.
[in]startThe lower bound of the field range. If NULL, no lower bound is enforced. It is copied and stored in the field range handle.
[in]start_inclusiveIndicates whether the value specified to start is included in the range. Specify KV_TRUE if it is included, KV_FALSE otherwise.
[in]endThe upper bound of the field range. If NULL, no upper bound is enforced. It is copied and stored in the field range handle.
[in]end_inclusiveIndicates whether the value specified to end is included in the range. Specify KV_TRUE if it is included, KV_FALSE otherwise.
[out]rangepThe output field range handle.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
void kv_release_field_range ( kv_field_range_t **  rangep)

Releases the resources used by the field range handle.

Parameters
[in]rangepThe pointer to the field range handle to release.