Main Page   Modules  

Database keys


Defines

#define DB_KEY_INIT(key, size)
 Database key static initializer. More...

#define dk_key(key)
 Database key accessor macro. More...

#define dk_len(key)
 Database key length accessor macro. More...


Typedefs

typedef struct _db_key_s db_key_t
 Database key. More...


Detailed Description

This module contains 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.


Define Documentation

#define DB_KEY_INIT( key, size )
 

This macro allows a db_key_t to be initialized statically.

Parameters:
key   A pointer to the key.
size   Size of the key.

#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:
key   A pointer to a db_key_t.
Returns:
A pointer to a key (void *).

#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:
key   A pointer to a db_key_t.
Returns:
An int describing the length of the key.


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


Generated at Thu Mar 6 21:23:10 2003 for dbprim by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001