#include <interfaces.hpp>
Inheritance diagram for I_DriverContext:

Definition at line 732 of file interfaces.hpp.
Public Types | |
| typedef int | TConnectionMode |
| enum | EConnectionMode { fBcpIn = 0x1, fPasswordEncrypted = 0x2, fDoNotConnect = 0x4 } |
| Connection mode. More... | |
| enum | ECapability { eBcp, eReturnITDescriptors, eReturnComputeResults } |
| Report if the driver supports this functionality. More... | |
Public Member Functions | |
| virtual | ~I_DriverContext (void) |
| virtual bool | SetLoginTimeout (unsigned int nof_secs=0)=0 |
| Set login timeout. | |
| virtual bool | SetTimeout (unsigned int nof_secs=0)=0 |
| Set connection timeouts. | |
| virtual unsigned int | GetLoginTimeout (void) const =0 |
| Get login timeout. | |
| virtual unsigned int | GetTimeout (void) const =0 |
| Get connection timeout. | |
| virtual bool | SetMaxTextImageSize (size_t nof_bytes)=0 |
| Set maximal size for Text and Image objects. | |
| CDB_Connection * | Connect (const string &srv_name, const string &user_name, const string &passwd, TConnectionMode mode, bool reusable=false, const string &pool_name=kEmptyStr) |
| Create new connection to specified server (or service) within this context. | |
| CDB_Connection * | ConnectValidated (const string &srv_name, const string &user_name, const string &passwd, IConnValidator &validator, TConnectionMode mode=0, bool reusable=false, const string &pool_name=kEmptyStr) |
| Create new connection to specified server (within this context). | |
| virtual CDB_Connection * | MakeConnection (const CDBConnParams ¶ms)=0 |
| Create connection object using Load Balancer / connection factory. | |
| virtual unsigned int | NofConnections (const string &srv_name="", const string &pool_name="") const =0 |
| Return number of currently open connections in this context. | |
| 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 messages. | |
| virtual void | PopCntxMsgHandler (CDB_UserHandler *h)=0 |
| Remove message handler "h" and all handlers above it in the stack. | |
| 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 all newly created connections. | |
| virtual void | PopDefConnMsgHandler (CDB_UserHandler *h)=0 |
| Remove `per-connection' mess. | |
| virtual bool | IsAbleTo (ECapability cpb) const =0 |
| Check if a driver is acle to provide necessary functionality. | |
| virtual void | CloseUnusedConnections (const string &srv_name=kEmptyStr, const string &pool_name=kEmptyStr)=0 |
| Close reusable deleted connections for specified server and/or pool. | |
| virtual void | SetApplicationName (const string &app_name)=0 |
| Set application name. | |
| virtual string | GetApplicationName (void) const =0 |
| Return application name. | |
| virtual void | SetHostName (const string &host_name)=0 |
| Set host name. | |
| virtual string | GetHostName (void) const =0 |
| Get host name. | |
Protected Member Functions | |
| I_DriverContext (void) | |
| virtual CDB_Connection * | MakePooledConnection (const CDBConnParams ¶ms)=0 |
| Create connection object WITHOUT using of Load Balancer / connection factory. | |
Friends | |
| class | IDBConnectionFactory |
|
|
Definition at line 749 of file interfaces.hpp. |
|
|
Report if the driver supports this functionality.
Definition at line 999 of file interfaces.hpp. |
|
|
Connection mode.
Definition at line 742 of file interfaces.hpp. |
|
|
Definition at line 266 of file interfaces.cpp. |
|
|
Definition at line 271 of file interfaces.cpp. |
|
||||||||||||
|
Close reusable deleted connections for specified server and/or pool.
Implemented in impl::CDriverContext. |
|
||||||||||||||||||||||||||||
|
Create new connection to specified server (or service) within this context.
It is your responsibility to delete the returned connection object. reusable - controls connection pooling mechanism. If it is set to true then a connection will be added to a pool of connections instead of closing. srv_name, user_name and passwd may be set to empty string. If pool_name is provided then connection will be taken from a pool having this name if a pool is not empty. It is your responsibility to put connections with the same server/user/password values in a pool. If a pool name is not provided but a server name (srv_name) is provided instead then connection with the same name will be taken from a pool of connections if a pool is not empty. If a pool is empty then new connection will be created unless you passed mode = fDoNotConnect. In this case NULL will be returned. If you did not provide either a pool name or a server name then NULL will be returned. Definition at line 277 of file interfaces.cpp. References MakeConnection(). Referenced by CBlobLoader::CBlobLoader(), CBlobRetriever::CBlobRetriever(), CDbapiSampleApp::CreateConnection(), CBlobStoreDynamic::GetConn(), main(), MergeExternal(), CDemoeApp::Run(), CDemoApp::RunSample(), and CId2FetchApp::x_InitPubSeqConnection(). |
|
||||||||||||||||||||||||||||||||
|
Create new connection to specified server (within this context).
It is your responsibility to delete the returned connection object. reusable - controls connection pooling mechanism. If it is set to true then a connection will be added to a pool of connections instead of closing. srv_name, user_name and passwd may be set to empty string. If pool_name is provided then connection will be taken from a pool having this name if a pool is not empty. It is your responsibility to put connections with the same server/user/password values in a pool. If a pool name is not provided but a server name (srv_name) is provided instead then connection with the same name will be taken from a pool of connections if a pool is not empty. If a pool is empty then new connection will be created unless you passed mode = fDoNotConnect. In this case NULL will be returned. If you did not provide either a pool name or a server name then NULL will be returned. Definition at line 299 of file interfaces.cpp. References MakeConnection(), and CDBDefaultConnParams::SetConnValidator(). Referenced by CDbapiSampleApp::CreateConnection(). |
|
|
Return application name.
Implemented in impl::CDriverContext. Referenced by IDataSource::GetApplicationName(). |
|
|
Get host name.
Implemented in impl::CDriverContext. |
|
|
Get login timeout.
Implemented in CTLibContext, and impl::CDriverContext. Referenced by CDBConnectionFactory::CalculateLoginTimeout(). |
|
|
Get connection timeout.
Implemented in CTLibContext, and impl::CDriverContext. Referenced by CDBConnectionFactory::CalculateConnectionTimeout(), and CDBConnectionFactory::MakeDBConnection(). |
|
|
Check if a driver is acle to provide necessary functionality.
|
|
|
Create connection object using Load Balancer / connection factory.
Implemented in impl::CDriverContext. Referenced by CConnection::CloneCDB_Conn(), Connect(), CConnection::Connect(), and ConnectValidated(). |
|
|
Create connection object WITHOUT using of Load Balancer / connection factory.
Implemented in impl::CDriverContext. Referenced by IDBConnectionFactory::CtxMakeConnection(). |
|
||||||||||||
|
Return number of currently open connections in this context.
Implemented in impl::CDriverContext. Referenced by CDataSource::~CDataSource(), and CDriverManager::~CDriverManager(). |
|
|
Remove message handler "h" and all handlers above it in the stack.
Implemented in impl::CDriverContext. Referenced by CDataSource::SetLogStream(), CDataSource::~CDataSource(), and CMsgHandlerGuard::~CMsgHandlerGuard(). |
|
|
Remove `per-connection' mess. handler "h" and all above it in the stack.
Implemented in impl::CDriverContext. Referenced by CDataSource::SetLogStream(), CDataSource::~CDataSource(), and CMsgHandlerGuard::~CMsgHandlerGuard(). |
|
||||||||||||
|
Add message handler "h" to process 'context-wide' (not bound to any particular connection) error messages.
Implemented in impl::CDriverContext. Referenced by python::CConnection::CConnection(), CMsgHandlerGuard::CMsgHandlerGuard(), CDbCopyApp::Run(), and CDataSource::SetLogStream(). |
|
||||||||||||
|
Add `per-connection' err.message handler "h" to the stack of default handlers which are inherited by all newly created connections.
Implemented in impl::CDriverContext. Referenced by python::CConnection::CConnection(), CMsgHandlerGuard::CMsgHandlerGuard(), CDbCopyApp::Run(), and CDataSource::SetLogStream(). |
|
|
Set application name.
Implemented in impl::CDriverContext. Referenced by IDataSource::SetApplicationName(). |
|
|
Set host name.
Implemented in impl::CDriverContext. |
|
|
Set login timeout.
Implemented in CTLibContext, CDBLibContext, and impl::CDriverContext. Referenced by CDBConnectionFactory::MakeDBConnection(), and CDataSource::SetLoginTimeout(). |
|
|
Set maximal size for Text and Image objects.
Implemented in CTLibContext, CDBLibContext, and impl::CDriverContext. Referenced by CBlobStoreDynamic::CBlobStoreDynamic(), CDbapiSendDataApp::RunSample(), and CDbapiCursorApp::RunSample(). |
|
|
Set connection timeouts.
Implemented in CTLibContext, CDBLibContext, and impl::CDriverContext. Referenced by CDBConnectionFactory::MakeDBConnection(). |
|
|
Definition at line 1079 of file interfaces.hpp. |
1.4.6
Modified on Wed Dec 09 08:20:12 2009 by modify_doxy.py rev. 173732