NCBI C++ ToolKit
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CDB_Connection Class Reference

Search Toolkit Book for CDB_Connection

#include <dbapi/driver/public.hpp>

+ Inheritance diagram for CDB_Connection:
+ Collaboration diagram for CDB_Connection:

Public Member Functions

virtual bool IsAlive ()
 Check out if connection is alive. More...
 
virtual CDB_LangCmdLangCmd (const string &lang_query)
 Make language command. More...
 
virtual CDB_RPCCmdRPC (const string &rpc_name)
 Make remote procedure call command. More...
 
virtual CDB_BCPInCmdBCPIn (const string &table_name)
 Make "bulk copy in" command. More...
 
virtual CDB_CursorCmdCursor (const string &cursor_name, const string &query, unsigned int batch_size)
 Make cursor command. More...
 
CDB_CursorCmdCursor (const string &cursor_name, const string &query)
 
virtual CDB_SendDataCmdSendDataCmd (I_BlobDescriptor &desc, size_t data_size, bool log_it=true, bool discard_results=true)
 Make "send-data" command. More...
 
virtual bool SendData (I_BlobDescriptor &desc, CDB_Stream &lob, bool log_it=true)
 Shortcut to send text and image to the server without using the "Send-data" command (SendDataCmd) More...
 
void SetDatabaseName (const string &name)
 Set database name. More...
 
virtual bool Refresh ()
 Reset the connection to the "ready" state (cancel all active commands) More...
 
virtual const stringServerName () const
 Get the server name. More...
 
virtual Uint4 Host () const
 Get the host. More...
 
virtual Uint2 Port () const
 Get the port. More...
 
virtual const stringUserName () const
 Get the user user. More...
 
virtual const stringPassword () const
 Get the password. More...
 
virtual const stringDatabaseName (void) const
 Get the database name. More...
 
virtual I_DriverContext::TConnectionMode ConnectMode () const
 Get the bitmask for the connection mode (BCP, secure login, ...) More...
 
virtual bool IsReusable () const
 Check if this connection is a reusable one. More...
 
unsigned int GetReuseCount () const
 Indicate how many times (if at all) this connection has been previously used. More...
 
virtual const stringPoolName () const
 Find out which connection pool this connection belongs to. More...
 
virtual I_DriverContextContext () const
 Get pointer to the driver context. More...
 
virtual void PushMsgHandler (CDB_UserHandler *h, EOwnership ownership=eNoOwnership)
 Put the message handler into message handler stack. More...
 
virtual void PopMsgHandler (CDB_UserHandler *h)
 Remove the message handler (and all above it) from the stack. More...
 
virtual CDB_ResultProcessorSetResultProcessor (CDB_ResultProcessor *rp)
 Set new result-processor. More...
 
virtual ~CDB_Connection ()
 Destructor. More...
 
virtual bool Abort ()
 Abort the connection. More...
 
virtual bool Close (void)
 Close an open connection. More...
 
virtual void SetTimeout (size_t nof_secs)
 Set connection timeout. More...
 
virtual void SetCancelTimeout (size_t nof_secs)
 Set timeout for command cancellation and connection closing. More...
 
size_t GetTimeout (void) const
 Get connection timeout. More...
 
size_t GetCancelTimeout (void) const
 Get timeout for command cancellation and connection closing. More...
 
virtual I_ConnectionExtraGetExtraFeatures (void)
 Get interface for extra features that could be implemented in the driver. More...
 
virtual string GetDriverName (void) const
 
bool HasTransaction (void) const
 
CDB_LangCmdLangCmd (const string &lang_query, unsigned int)
 
CDB_RPCCmdRPC (const string &rpc_name, unsigned int)
 
CDB_BCPInCmdBCPIn (const string &table_name, unsigned int)
 
CDB_CursorCmdCursor (const string &cursor_name, const string &query, unsigned int, unsigned int batch_size)
 
void FinishOpening (void)
 
- Public Member Functions inherited from I_Connection
 I_Connection (void)
 
virtual ~I_Connection (void)
 
CDB_LangCmdLangCmd (const string &lang_query, unsigned int)
 
CDB_RPCCmdRPC (const string &rpc_name, unsigned int)
 
CDB_BCPInCmdBCPIn (const string &table_name, unsigned int)
 
CDB_CursorCmdCursor (const string &cursor_name, const string &query, unsigned int, unsigned int batch_size)
 
- Public Member Functions inherited from IBalanceable
virtual ~IBalanceable ()
 

Private Member Functions

 CDB_Connection (impl::CConnection *c)
 
 CDB_Connection ()
 
CDB_Connectionoperator= (const CDB_Connection &)
 
 CDB_Connection (const CDB_Connection &)
 
void ReleaseImpl (void)
 
bool x_IsAlive (void)
 

Private Attributes

impl::CConnectionm_ConnImpl
 
bool m_HasTransaction
 

Friends

class impl::CDriverContext
 
class CAutoTrans
 
class CInterfaceHook< CDB_Connection >
 

Additional Inherited Members

- Protected Member Functions inherited from I_Connection
CDB_CursorCmdCursor (const string &cursor_name, const string &query)
 

Detailed Description

Definition at line 69 of file public.hpp.


The documentation for this class was generated from the following files:
Modified on Sat Dec 09 04:49:48 2023 by modify_doxy.py rev. 669887