Functions

bdb_lib.c File Reference

Berkeley DB : Library. More...

#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include "../../ut.h"
#include "../../mem/mem.h"
#include "../../dprint.h"
#include "bdb_fld.h"
#include "bdb_lib.h"
Include dependency graph for bdb_lib.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file bdb_lib.c.


Function Documentation

int bdblib_close ( bdb_db_p  _db_p,
str dirpath 
)

assumes the lib data-structures are already initialzed; used to sync and reload the db file.

Definition at line 101 of file bdb_lib.c.

References _str::len, and _str::s.

bdb_table_p bdblib_create_table ( bdb_db_p  _db,
str _s 
)

On startup, we do not create any of the db handles. Instead it is done on first-use (lazy-initialized) to only create handles to files (db) that we require.

There is one db file per openser table (eg. acc), and they should exist in your DB_PATH (refer to kamctlrc) directory.

This function does _not_ create the underlying binary db tables. Creating the tables MUST be manually performed before openser startup by 'kamdbctl create'

Function returns NULL on error, which will cause openser to exit.

Definition at line 529 of file bdb_lib.c.

References _str::len, and _str::s.

Referenced by bdblib_get_table().

Here is the caller graph for this function:

bdb_tcache_p bdblib_get_table ( bdb_db_t *  _db,
str _s 
)

if dne, create a new one and add to the list

Definition at line 400 of file bdb_lib.c.

References bdblib_create_table(), _str::len, and _str::s.

Here is the call graph for this function:

int bdblib_reopen ( bdb_db_p  _db_p,
str dirpath 
)

assumes the lib data-structures are already initialzed; used to sync and reload the db file.

Definition at line 175 of file bdb_lib.c.

References _str::len, and _str::s.