Data Structures | |
struct | apr_sdbm_datum_t |
Defines | |
#define | APR_SDBM_DIRFEXT ".dir" |
#define | APR_SDBM_PAGFEXT ".pag" |
#define | APR_SDBM_INSERT 0 |
#define | APR_SDBM_REPLACE 1 |
#define | APR_SDBM_INSERTDUP 2 |
Typedefs | |
typedef apr_sdbm_t | apr_sdbm_t |
Functions | |
apr_status_t | apr_sdbm_open (apr_sdbm_t **db, const char *name, apr_int32_t mode, apr_fileperms_t perms, apr_pool_t *p) |
apr_status_t | apr_sdbm_close (apr_sdbm_t *db) |
apr_status_t | apr_sdbm_lock (apr_sdbm_t *db, int type) |
apr_status_t | apr_sdbm_unlock (apr_sdbm_t *db) |
apr_status_t | apr_sdbm_fetch (apr_sdbm_t *db, apr_sdbm_datum_t *value, apr_sdbm_datum_t key) |
apr_status_t | apr_sdbm_store (apr_sdbm_t *db, apr_sdbm_datum_t key, apr_sdbm_datum_t value, int opt) |
apr_status_t | apr_sdbm_delete (apr_sdbm_t *db, const apr_sdbm_datum_t key) |
apr_status_t | apr_sdbm_firstkey (apr_sdbm_t *db, apr_sdbm_datum_t *key) |
apr_status_t | apr_sdbm_nextkey (apr_sdbm_t *db, apr_sdbm_datum_t *key) |
int | apr_sdbm_rdonly (apr_sdbm_t *db) |
#define APR_SDBM_DIRFEXT ".dir" |
SDBM Directory file extension
#define APR_SDBM_INSERT 0 |
Insert
#define APR_SDBM_INSERTDUP 2 |
Insert with duplicates
#define APR_SDBM_PAGFEXT ".pag" |
SDBM page file extension
#define APR_SDBM_REPLACE 1 |
Replace
typedef struct apr_sdbm_t apr_sdbm_t |
Structure for referencing an sdbm
apr_status_t apr_sdbm_close | ( | apr_sdbm_t * | db | ) |
Close an sdbm file previously opened by apr_sdbm_open
db | The database to close |
apr_status_t apr_sdbm_delete | ( | apr_sdbm_t * | db, | |
const apr_sdbm_datum_t | key | |||
) |
Delete an sdbm record value by key
db | The database | |
key | The key datum of the record to delete |
apr_status_t apr_sdbm_fetch | ( | apr_sdbm_t * | db, | |
apr_sdbm_datum_t * | value, | |||
apr_sdbm_datum_t | key | |||
) |
Fetch an sdbm record value by key
db | The database | |
value | The value datum retrieved for this record | |
key | The key datum to find this record |
apr_status_t apr_sdbm_firstkey | ( | apr_sdbm_t * | db, | |
apr_sdbm_datum_t * | key | |||
) |
Retrieve the first record key from a dbm
db | The database | |
key | The key datum of the first record |
apr_status_t apr_sdbm_lock | ( | apr_sdbm_t * | db, | |
int | type | |||
) |
Lock an sdbm database for concurency of multiple operations
db | The database to lock | |
type | The lock type APR_FLOCK_SHARED APR_FLOCK_EXCLUSIVE |
apr_status_t apr_sdbm_nextkey | ( | apr_sdbm_t * | db, | |
apr_sdbm_datum_t * | key | |||
) |
Retrieve the next record key from an sdbm
db | The database | |
key | The key datum of the next record |
apr_status_t apr_sdbm_open | ( | apr_sdbm_t ** | db, | |
const char * | name, | |||
apr_int32_t | mode, | |||
apr_fileperms_t | perms, | |||
apr_pool_t * | p | |||
) |
Open an sdbm database by file name
db | The newly opened database | |
name | The sdbm file to open | |
mode | The flag values (APR_READ and APR_BINARY flags are implicit) APR_WRITE open for read-write access APR_CREATE create the sdbm if it does not exist APR_TRUNCATE empty the contents of the sdbm APR_EXCL fail for APR_CREATE if the file exists APR_DELONCLOSE delete the sdbm when closed APR_SHARELOCK support locking across process/machines | |
perms | Permissions to apply to if created | |
p | The pool to use when creating the sdbm |
int apr_sdbm_rdonly | ( | apr_sdbm_t * | db | ) |
Returns true if the sdbm database opened for read-only access
db | The database to test |
apr_status_t apr_sdbm_store | ( | apr_sdbm_t * | db, | |
apr_sdbm_datum_t | key, | |||
apr_sdbm_datum_t | value, | |||
int | opt | |||
) |
Store an sdbm record value by key
db | The database | |
key | The key datum to store this record by | |
value | The value datum to store in this record | |
opt | The method used to store the record APR_SDBM_INSERT return an error if the record exists APR_SDBM_REPLACE overwrite any existing record for key |
apr_status_t apr_sdbm_unlock | ( | apr_sdbm_t * | db | ) |
Release an sdbm lock previously aquired by apr_sdbm_lock
db | The database to unlock |