NCBI C++ ToolKit
Classes | Namespaces | Macros | Functions | Variables
context.cpp File Reference
#include <ncbi_pch.hpp>
#include "ctlib_utils.hpp"
#include <corelib/plugin_manager_store.hpp>
#include <corelib/ncbi_param.hpp>
#include <dbapi/driver/driver_mgr.hpp>
#include <dbapi/driver/dbapi_driver_conn_mgr.hpp>
#include <dbapi/driver/ctlib/interfaces.hpp>
#include <dbapi/driver/util/pointer_pot.hpp>
#include <dbapi/driver/impl/handle_stack.hpp>
#include <dbapi/error_codes.hpp>
#include <algorithm>
#include <winsock2.h>
#include "../ncbi_win_hook.hpp"
+ Include dependency graph for context.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CTLibContextRegistry
 
class  CDbapiCtlibCF_Sybase
 

Namespaces

 ctlib
 

Macros

#define NCBI_USE_ERRCODE_X   Dbapi_CTLib_Context
 
#define NCBI_CTLIB_TDS_VERSION   125
 
#define NCBI_CTLIB_TDS_FALLBACK_VERSION   110
 
#define FTDS_VERSION_ERR_LEVEL   Warning
 

Functions

CDiagCompileInfo GetBlankCompileInfo (void)
 
static void PassException (unique_ptr< CDB_Exception > &ex, const string &server_name, const string &user_name, CS_INT severity, const CDBParams *params, ERetriable retriable, unsigned int rows_in_batch=0)
 
static CS_RETCODE HandleConnStatus (CS_CONNECTION *conn, CS_CLIENTMSG *msg, const string &server_name, const string &user_name)
 
 NCBI_PARAM_DECL (int, ctlib, TDS_VERSION)
 
 NCBI_PARAM_DEF_EX (int, ctlib, TDS_VERSION, 125, eParam_NoThread, CTLIB_TDS_VERSION)
 
typedef NCBI_PARAM_TYPE (ctlib, TDS_VERSION) TCtlibTdsVersion
 
CS_INT GetCtlibTdsVersion (int version)
 
void NCBI_EntryPoint_xdbapi_ctlib (CPluginManager< I_DriverContext >::TDriverInfoList &info_list, CPluginManager< I_DriverContext >::EEntryPointRequest method)
 
void DBAPI_RegisterDriver_CTLIB (void)
 

Variables

static CSafeStatic< CRWLocks_CTLCtxLock (CSafeStaticLifeSpan::eLifeSpan_Long)
 Static lock which will guard all thread-unsafe operations on most ctlib contexts and a handful of ctlib-scale operations such as cs_init and cs_ctx_*. More...
 

Macro Definition Documentation

◆ FTDS_VERSION_ERR_LEVEL

#define FTDS_VERSION_ERR_LEVEL   Warning

Definition at line 1673 of file context.cpp.

◆ NCBI_CTLIB_TDS_FALLBACK_VERSION

#define NCBI_CTLIB_TDS_FALLBACK_VERSION   110

Definition at line 1646 of file context.cpp.

◆ NCBI_CTLIB_TDS_VERSION

#define NCBI_CTLIB_TDS_VERSION   125

Definition at line 1643 of file context.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Dbapi_CTLib_Context

Definition at line 62 of file context.cpp.

Function Documentation

◆ GetBlankCompileInfo()

CDiagCompileInfo GetBlankCompileInfo ( void  )
inline

Definition at line 76 of file context.cpp.

◆ GetCtlibTdsVersion()

CS_INT GetCtlibTdsVersion ( int  version)

◆ HandleConnStatus()

static CS_RETCODE HandleConnStatus ( CS_CONNECTION conn,
CS_CLIENTMSG msg,
const string server_name,
const string user_name 
)
static

◆ NCBI_EntryPoint_xdbapi_ctlib()

void NCBI_EntryPoint_xdbapi_ctlib ( CPluginManager< I_DriverContext >::TDriverInfoList &  info_list,
CPluginManager< I_DriverContext >::EEntryPointRequest  method 
)

◆ NCBI_PARAM_DECL()

NCBI_PARAM_DECL ( int  ,
ctlib  ,
TDS_VERSION   
)

◆ NCBI_PARAM_DEF_EX()

NCBI_PARAM_DEF_EX ( int  ,
ctlib  ,
TDS_VERSION  ,
125  ,
eParam_NoThread  ,
CTLIB_TDS_VERSION   
)

◆ NCBI_PARAM_TYPE()

typedef NCBI_PARAM_TYPE ( ctlib  ,
TDS_VERSION   
)

◆ PassException()

static void PassException ( unique_ptr< CDB_Exception > &  ex,
const string server_name,
const string user_name,
CS_INT  severity,
const CDBParams params,
ERetriable  retriable,
unsigned int  rows_in_batch = 0 
)
static

Variable Documentation

◆ s_CTLCtxLock

Static lock which will guard all thread-unsafe operations on most ctlib contexts and a handful of ctlib-scale operations such as cs_init and cs_ctx_*.

It is added because several CTLibContext classes can share one global underlying context handle, so there is no other way to synchronize them but some global lock. Use of non-global context handles considered to be very rare so the impact on using it through global lock can be treated as insignificant.

Referenced by CTLibContextRegistry::ClearAll(), CTLibContext::CTLIB_cserr_handler(), CTLibContext::CTLIB_cterr_handler(), CTLibContext::CTLIB_srverr_handler(), CTLibContext::CTLibContext(), CTLibContext::x_GetCtxLock(), and CTLibContext::~CTLibContext().

Modified on Fri Sep 20 14:57:34 2024 by modify_doxy.py rev. 669887