Global SQLAPI++ settings class. More...

Static Public Member Functions

static char *SQLAPI_CALLBACK setlocale (int category, const char *locale)
 The wrapper for LIBC setlocale function. More...
static void Initialize ()
 Initialize SQLAPI++ library. More...
static void UnInitialize ()
 Uninitialize SQLAPI++ library. More...
static int GetVersionMajor ()
 Returns the Library major version number.
static int GetVersionMinor ()
 Returns the Library minor version number.
static int GetVersionBuild ()
 Returns the Library build version number.
static const SACharClientToString (SAClient_t eSAClient)
 Returns a name of a specified DBMS client type.
static SAClient_t StringToClient (const SAChar *szClientName)
 Returns a DBMS client type of a specified client name.
static void SetTraceFunction (SATraceInfo_t traceInfo, SATraceFunction_t traceFunc, void *pData)
 Setups the Library tracing callback function.
static int & doubleConvertPrecision ()
 Can be used for the tuning the default double conversion precision.

Detailed Description

Global SQLAPI++ settings class.

We use class to avoid namespace using

Member Function Documentation

◆ setlocale()

char *SQLAPI_CALLBACK SAGlobals::setlocale ( int  category,
const char *  locale 

The wrapper for LIBC setlocale function.

Executes LIBC setlocale function with passed parameters.

Setting current locale for an application process can be important for LIBC using when LIBC function uses "C" locale by default. SQLAPI++ also uses LIBC functions and without locale setup SQLAPI++ routines will use "C" locale (for example SAString multi-byte to wide string conversion functions will use ASCII character set).

◆ Initialize()

void SAGlobals::Initialize ( )

Initialize SQLAPI++ library.

This function sets the way the Library resources freed.

No any Library resources is unallocated automatically (related to global and hidden SAPI objects) at once this function is called.

SAGlobals::UnInitialize method should be called then.

See also

◆ UnInitialize()

void SAGlobals::UnInitialize ( )

Uninitialize SQLAPI++ library.

This function releases all Library global resources.

It unititializes all DBMS clients, connections, commands an related resources.

The Library does this also when all global objects destroyed but you cannot control the time this happens. In the end some shared resources can be freed before DBMS client library (used by the Library) is released. This leads to crashes and errors at the application exit. The typical situation - when the application uses exit() syscall.

See also