User Tools

Site Tools


Sidebar

Table Of Contents

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

Bojoin

Name

Bojoin — outer join source buffer into destination buffer

Synopsis

#include <ubf.h>

int Bojoin(UBFH *dest, UBFH *src);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Bojoin function is similar to Bjoin function. Outer join function updates destination buffer in dest with source buffer src values based on matching fields and occurrence. Function will update existing fields from source buffer to destination with matching occurrences. If field does not exist or occurrence does not exists, then field/occurrence is not removed from destination buffer. By comparing to Bupdate(3), this function updates only matched fields, and does not add any missing as it is done by Bupdate(3). By comparing to Bjoin(3), Bjoin(3) will remove not matched fields from dest, but Bojoin() will leave dest fields non deleted.

RETURN VALUE

On success, Bojoin() return zero; on error, -1 is returned, with Berror set to indicate the error.

ERRORS

Bstrerror(3) can give more description for error (for last call).

BALIGNERR Corrupted buffer or pointing to not aligned memory area.

BNOTFLD Buffer not fielded, not correctly allocated or corrupted. dest or src is NULL.

FBADFLD Invalid field type.

EXAMPLE

See ubftest/test_bojoin.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd