SOS: Scalable Object Store
4.0.0
|
Implements the structure of a key. More...
#include <ods_idx.h>
Public Attributes | |
uint16_t | len |
unsigned char | value [0] |
Implements the structure of a key.
A key is a counted array of bytes with the following format: struct ods_key_value { uint16_t len; unsigned char value[0]; };
The key is simply a special format for the value portion of an ODS object. A key can also be used as an argument to any function that otherwise takes an ods_obj_t.
Keys are ordered. A 'comparator' abstraction is used to define the order and equivalence of two keys. A comparator is defined by a name that indirectly identifies a shared library that implements the comparator function. There are a set of pre-defined comparator functions for which there are convenience macros to specify their names as follows:
These macros are used as parameters to the ods_idx_create() function when the index is created.