NCBI C++ ToolKit
|
#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"
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< CRWLock > | s_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... | |
#define FTDS_VERSION_ERR_LEVEL Warning |
Definition at line 1673 of file context.cpp.
#define NCBI_CTLIB_TDS_FALLBACK_VERSION 110 |
Definition at line 1646 of file context.cpp.
#define NCBI_CTLIB_TDS_VERSION 125 |
Definition at line 1643 of file context.cpp.
#define NCBI_USE_ERRCODE_X Dbapi_CTLib_Context |
Definition at line 62 of file context.cpp.
|
inline |
Definition at line 76 of file context.cpp.
Definition at line 1676 of file context.cpp.
References CS_VERSION_100, CS_VERSION_110, CS_VERSION_120, CS_VERSION_125, CS_VERSION_150, CS_VERSION_155, CS_VERSION_157, ERR_POST_X, FTDS_VERSION_ERR_LEVEL, NCBI_CTLIB_TDS_FALLBACK_VERSION, NCBI_CTLIB_TDS_VERSION, and dtl::version.
Referenced by CDbapiCtlibCFBase::CreateInstance().
|
static |
Definition at line 1159 of file context.cpp.
References conn, CS_CANCEL_ATTN, CS_FAIL, CS_GET, CS_LOGIN_STATUS, CS_SUCCEED, CS_UNUSED, ct_cancel(), ct_con_props(), DIAG_COMPILE_INFO, eRetriable_No, msg(), NULL, and PassException().
Referenced by CTLibContext::CTLIB_cterr_handler().
void NCBI_EntryPoint_xdbapi_ctlib | ( | CPluginManager< I_DriverContext >::TDriverInfoList & | info_list, |
CPluginManager< I_DriverContext >::EEntryPointRequest | method | ||
) |
Definition at line 1909 of file context.cpp.
References CHostEntryPointImpl< TClassFactory >::NCBI_EntryPointImpl().
Referenced by DBAPI_RegisterDriver_CTLIB().
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 | |||
) |
|
static |
Definition at line 1136 of file context.cpp.
References impl::CDBExceptionStorage::Accept(), GetCTLExceptionStorage(), and impl::CDBExceptionStorage::SetRetriable().
Referenced by CTLibContext::CTLIB_cterr_handler(), CTLibContext::CTLIB_srverr_handler(), and HandleConnStatus().
|
static |
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().