User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:bflddbload.3

bflddbload

Name

Bflddbload — load UBF custom field database manually

Synopsis

#include <ubf.h>

int Bflddbload(void);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Load (and open EXDB/LMDB) handlers to the UBF custom field storage database. This function is automatically called when accessing UBF commands which require field tables, for converting field IDs to string names and vice versa.

This function could be useful in cases when manually closing the database by Bflddbunload(3), performing unlink by Bflddbunlink(3) and then opening the handlers again. Because in cases if UBF standard functions already pulled in the init of field tables, it will not do it again.

RETURN VALUE

On success, Bflddbload() returns 1 (meaning common-configuration (CC) and [@ubfdb] section found. Function returns 0 in case if CC configuration not found or [@ubfdb] configuration section is not found. In case of error -1 is returned.

ERRORS

In case of error Berror will be non 0. Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BEINVAL resource parameter is missing for [@ubfdb] section.

BMALLOC malloc failed.

BEUNIX failed to load ini file(s). EXDB failed.

BNOSPACE lmdb max readers reached or other limit, see logs for details.

EXAMPLE

See atmitest/test050_ubfdb/atmiclt50.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd