libcmdbm 0.2.0
MyBatis-like SQL mapping library for C99
Loading...
Searching...
No Matches
Library initialization and version.

Functions

const char * CMDBM_GetLibVersion (void)
 Version of the library which is being run.
 
void CMDBM_Init (void)
 Initialize the library.
 
void CMDBM_Clear (void)
 Release everything the library holds.
 

Detailed Description

Function Documentation

◆ CMDBM_GetLibVersion()

const char * CMDBM_GetLibVersion ( void  )

Version of the library which is being run.

The value is the contents of the VERSION file the library was built from, as a "major.minor.patch" string.

Returns
A static string, never NULL. It must not be freed.

◆ CMDBM_Init()

void CMDBM_Init ( void  )

Initialize the library.

Must be called before anything else in this header, from a single thread. It initializes libcmutils with the CMMemSystem allocator, prepares the mapper parser and builds the registry of the DBMS modules compiled in.

Call it exactly once per process: unlike CMUTIL_Init it is not reference counted, and a second call leaks the registry the first one built. An application which wants its logging configured before libcmdbm logs anything can take the libcmutils reference itself first - see the logging section of the project README.

See also
CMDBM_Clear

◆ CMDBM_Clear()

void CMDBM_Clear ( void  )

Release everything the library holds.

Destroy every context first: a datasource which outlives this call keeps a DBMS client library alive that nothing will clean up afterwards, which is reported as a warning. The call ends with CMUTIL_Clear(), so libcmutils is torn down as well - and its leak report covers this library too.

See also
CMDBM_Init