: m_loginTimeout(30), m_context(
ctx), m_poolUsed(
false),
97 _TRACE(
"SetLogStream(): CDataSource "<< (
void*)
this 98<<
": message handler "<< (
void*)
m_multiExH 99<<
" removed from context "<< (
void*)
m_context);
106 _TRACE(
"SetLogStream(): CDataSource "<< (
void*)
this 107<<
": new default message handler "<< (
void*)newH
116 _TRACE(
"SetLogStream(): CDataSource "<< (
void*)
this 117<<
": message handler "<< (
void*)
m_multiExH 118<<
" installed on context "<< (
void*)
m_context);
161 "CDataSource::GetDriverContext(): no valid context" 182 conn->AddListener(
this);
void RemoveListener(CActiveObject *obj)
void SetIdent(const string &name)
void AddListener(CActiveObject *obj)
void Notify(const CDbapiEvent &e)
virtual IConnection * CreateConnection(EOwnership ownership)
virtual I_DriverContext * GetDriverContext()
Returns the pointer to the general driver interface.
virtual string GetErrorInfo()
Returns all server messages as a single string.
I_DriverContext * m_context
virtual void SetLogStream(CNcbiOstream *out)
virtual ~CDataSource(void)
virtual void SetLoginTimeout(unsigned int i)
Set login timeout.
virtual CDB_MultiEx * GetErrorAsEx()
Returns all server messages as a CDB_MultiEx object.
virtual void Action(const CDbapiEvent &e)
class CToMultiExHandler * m_multiExH
class CToMultiExHandler * GetHandler()
CActiveObject * GetSource() const
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
CDB_MultiEx * GetMultiEx()
#define CHECK_NCBI_DBAPI(failed, message)
std::ofstream out("events_result.xml")
main entry point for tests
static CS_CONNECTION * conn
static CDB_UserHandler * SetDefault(CDB_UserHandler *h)
virtual bool HandleIt(CDB_Exception *ex)
Handle the exceptions resulting from a native API call, one-by-one.
virtual void PushDefConnMsgHandler(CDB_UserHandler *h, EOwnership ownership=eNoOwnership)=0
Add `per-connection' err.message handler "h" to the stack of default handlers which are inherited by ...
virtual bool SetLoginTimeout(unsigned int nof_secs=0)=0
Set login timeout.
virtual void PopCntxMsgHandler(CDB_UserHandler *h)=0
Remove message handler "h" and all handlers above it in the stack.
virtual void PushCntxMsgHandler(CDB_UserHandler *h, EOwnership ownership=eNoOwnership)=0
Add message handler "h" to process 'context-wide' (not bound to any particular connection) error mess...
virtual void CloseUnusedConnections(const string &srv_name=kEmptyStr, const string &pool_name=kEmptyStr, unsigned int max_closings=kMax_UInt)=0
Close reusable deleted connections for specified server and/or pool.
virtual void PopDefConnMsgHandler(CDB_UserHandler *h)=0
Remove `per-connection' mess.
virtual unsigned int NofConnections(const string &srv_name="", const string &pool_name="") const =0
Return number of currently open connections in this context.
#define NCBI_CATCH_ALL_X(err_subcode, message)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
Definition of all error codes used in dbapi libraries (dbapi_driver.lib and others).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4