The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the db_key_t structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure.
Data Structures | |
struct | _db_key_s |
Database key structure. More... | |
Defines | |
#define | DB_KEY_INIT(key, size) |
Database key static initializer. | |
#define | dk_key(key) |
Database key accessor macro. | |
#define | dk_len(key) |
Database key length accessor macro. | |
#define | DB_FLAG_REVERSE |
Reverse flag. | |
Typedefs | |
typedef _db_key_s | db_key_t |
Database key. |
|
This flag can be passed to ordered iterations to reverse the order of the iterations. |
|
This macro allows a db_key_t to be initialized statically.
|
|
This macro allows access to the key field of a db_key_t. It may be used as an lvalue in order to assign a key to a db_key_t.
Definition at line 608 of file dbprim.h. Referenced by _sh_find_comp(), hash_comp(), hash_fnv1(), hash_fnv1a(), rbtree_comp(), sh_find(), st_add(), and st_find(). |
|
This macro allows access to the key length field of a db_key_t. It may be used as an lvalue in order to assign a length to a db_key_t.
Definition at line 621 of file dbprim.h. Referenced by hash_comp(), hash_fnv1(), hash_fnv1a(), rbtree_comp(), st_add(), and st_find(). |
|
This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with dk_key() and dk_len(). |