Back to home page

Enduro/X

 
 

    


0001 BFLDDDBGETENV(3)
0002 ================
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bfldddbgetenv - get UBF custom field LMDB database handlers
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 EDB_env * Bfldddbgetenv (EDB_dbi **'dbi_id', EDB_dbi **'dbi_nm');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 Function returns EXDB (formerly LMDB) handlers for custom fields storage database.
0023 Parameter 'dbi_id' is handler for fields hashed by field id (compiled). The key
0024 in this case is field id, key bytes equals to sizeof(BFLDID). The 'dbi_nm' is
0025 handler for named name database. The key in this case is field id + EOS (0x00)
0026 byte. Function returns the EXDB/LMDB environment handler.
0027 
0028 This function shall be used to acquire handlers for getting transaction object
0029 which is need for field adding/deleting/db dropping and for performing iteration
0030 over the fields stored.
0031 
0032 When function is called. And attempt to parse and load '[@ubfdb]' ini section
0033 from common-configuration is performed.
0034 
0035 RETURN VALUE
0036 ------------
0037 On success, *Bfldddbgetenv()* returns EXDB environment handler.
0038 In case of error, function returns NULL and the error is set.
0039 
0040 ERRORS
0041 ------
0042 In case of error *Berror* will be non *0*. Note that *Bstrerror()* returns 
0043 generic error message plus custom message with  debug info from last function call.
0044 
0045 *BEINVAL* 'dbi_id', 'dbi_nm' is NULL. 'resource' parameter is missing 
0046 for '[@ubfdb]' section.
0047 
0048 *BMALLOC* malloc failed.
0049 
0050 *BEUNIX* failed to load ini file(s). EXDB failed.
0051 
0052 
0053 EXAMPLE
0054 -------
0055 See *atmitest/test050_ubfdb/atmiclt50.c* for sample code.
0056 
0057 BUGS
0058 ----
0059 Report bugs to support@mavimax.com
0060 
0061 SEE ALSO
0062 --------
0063 *Bflddbload(3)* *Bflddbid(3)* *Bflddbname(3)* *Bflddbget(3)* *Bflddbunload(3)*
0064 *Bflddbdrop(3)* *Bflddbdel(3)* *Bflddbadd(3)* *Bflddbunlink(3)*
0065 
0066 COPYING
0067 -------
0068 (C) Mavimax, Ltd
0069