0001 BFLDDBADD(3)
0002 ============
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 Bflddbadd - add field to UBF custom field database.
0009
0010 SYNOPSIS
0011 --------
0012
0013 #include <ubf.h>
0014
0015 int Bflddbadd(EDB_txn *txn, short fldtype, BFLDID bfldno, char *fldname);
0016
0017
0018 Link with '-lubf -lnstd -lm -lpthread'
0019
0020 DESCRIPTION
0021 -----------
0022 Function is used to populate UBF database with custom fields. Note that function
0023 is not cluster aware, thus Enduro/X programmer for distributed operations shall
0024 create it's own mechanisms for cluster aware field database. For example use
0025 Enduro/X eventing mechanisms and some XATMI servers which subscribes to the
0026 events and then by events populate the records in local UBF database by using
0027 this function. The field number (non compiled) is passed in the 'bfldno' field,
0028 The field name is passed in the 'fldname' parameter.
0029
0030 Field is added as part of the LMDB transaction, which is passed
0031 in the 'txn' variable. The transaction is open by edb_txn_begin() and finished by
0032 edb_txn_commit() or edb_txn_abort().
0033
0034 RETURN VALUE
0035 ------------
0036 On success, *Bflddbadd()* return zero; on error, -1 is returned, with *Berror* set to
0037 indicate the error.
0038
0039 ERRORS
0040 ------
0041 In case of error *Berror* will be non *0*. Note that *Bstrerror()* returns
0042 generic error message plus custom message with debug info from last function call.
0043
0044 *BEINVAL* 'txn' transaction object is NULL. Field id in 'bfldno' <=0. 'fldtype'
0045 is out of range of *BFLD_MIN* and *BFLD_MAX*. 'fldname' is NULL or empty.
0046
0047 *BNOSPACE* LMDB error - no space, see logs.
0048
0049 *BEUNIX* LMDB error, see logs.
0050
0051 EXAMPLE
0052 -------
0053 See *atmitest/test050_ubfdb/atmiclt50.c* for sample code.
0054
0055 BUGS
0056 ----
0057 Report bugs to support@mavimax.com
0058
0059 SEE ALSO
0060 --------
0061 *Bflddbid(3)* *Bflddbname(3)* *Bflddbload(3)* *Bflddbunload(3)*
0062 *Bflddbunlink(3)* *Bflddbdrop(3)* *Bflddbdel(3)* *Bflddbget(3)* *ubfdb.ini(5)*
0063
0064 COPYING
0065 -------
0066 (C) Mavimax, Ltd
0067