Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

Database Primitives


Detailed Description

This module describes interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure.

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.


Define Documentation

#define DB_FLAG_REVERSE
 

This flag can be passed to ordered iterations to reverse the order of the iterations.

Definition at line 629 of file dbprim.h.

Referenced by ll_iter(), and rt_next().

#define DB_KEY_INIT key,
size   ) 
 

This macro allows a db_key_t to be initialized statically.

Parameters:
[in] key A pointer to the key.
[in] size Size of the key.

Definition at line 596 of file dbprim.h.

#define dk_key key   ) 
 

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.

Parameters:
[in] key A pointer to a db_key_t.
Returns:
A pointer to a key (void *).

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().

#define dk_len key   ) 
 

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.

Parameters:
[in] key A pointer to a db_key_t.
Returns:
An int describing the length of the key.

Definition at line 621 of file dbprim.h.

Referenced by hash_comp(), hash_fnv1(), hash_fnv1a(), rbtree_comp(), st_add(), and st_find().


Typedef Documentation

typedef struct _db_key_s db_key_t
 

This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with dk_key() and dk_len().

Definition at line 254 of file dbprim.h.


Generated on Sat Jul 15 14:10:56 2006 for DatabasePrimitivesLibrary by  doxygen 1.4.4