NCBI C++ ToolKit
Public Types | Public Member Functions | List of all members
IConnection Class Referenceabstract

Search Toolkit Book for IConnection

#include <dbapi/dbapi.hpp>

+ Inheritance diagram for IConnection:

Public Types

enum  EConnMode { eBulkInsert = I_DriverContext::fBcpIn , ePasswordEncrypted = I_DriverContext::fPasswordEncrypted }
 Which connection mode. More...
 

Public Member Functions

virtual ~IConnection ()
 Destructor. More...
 
virtual void SetMode (EConnMode mode)=0
 Set connection mode. More...
 
virtual void ResetMode (EConnMode mode)=0
 Reset connection mode. More...
 
virtual unsigned int GetModeMask ()=0
 Get mode mask. More...
 
virtual void ForceSingle (bool enable)=0
 Force single connection mode, default false. More...
 
virtual IDataSourceGetDataSource ()=0
 Get parent datasource object. More...
 
virtual void Connect (const string &user, const string &password, const string &server, const string &database=kEmptyStr)=0
 Connect to a database. More...
 
virtual void Connect (const CDBConnParams &params)=0
 Connect to a database. More...
 
virtual void ConnectValidated (IConnValidator &validator, const string &user, const string &password, const string &server, const string &database=kEmptyStr)=0
 Connect to a database using connect validator. More...
 
virtual IConnectionCloneConnection (EOwnership ownership=eNoOwnership)=0
 Clone existing connection. More...
 
virtual void SetDatabase (const string &name)=0
 Set current database. More...
 
virtual string GetDatabase ()=0
 Get current database. More...
 
virtual bool IsAlive ()=0
 Check if the connection is alive. More...
 
virtual IStatementGetStatement ()=0
 Get statement object for regular SQL queries. More...
 
virtual ICallableStatementGetCallableStatement (const string &proc)=0
 Get callable statement object for stored procedures. More...
 
ICallableStatementGetCallableStatement (const string &proc, int)
 
virtual ICursorGetCursor (const string &name, const string &sql, int batchSize)=0
 Get cursor object. More...
 
ICursorGetCursor (const string &name, const string &sql)
 
ICursorGetCursor (const string &name, const string &sql, int, int batchSize)
 
virtual IBulkInsertGetBulkInsert (const string &table_name)=0
 Create bulk insert object. More...
 
IBulkInsertGetBulkInsert (const string &table_name, unsigned int)
 
virtual IStatementCreateStatement ()=0
 Get statement object for regular SQL queries. More...
 
virtual ICallableStatementPrepareCall (const string &proc)=0
 Get callable statement object for stored procedures. More...
 
ICallableStatementPrepareCall (const string &proc, int)
 
virtual ICursorCreateCursor (const string &name, const string &sql, int batchSize)=0
 Get cursor object. More...
 
ICursorCreateCursor (const string &name, const string &sql)
 
ICursorCreateCursor (const string &name, const string &sql, int, int batchSize)
 
virtual IBulkInsertCreateBulkInsert (const string &table_name)=0
 Create bulk insert object. More...
 
IBulkInsertCreateBulkInsert (const string &table_name, unsigned int)
 
virtual void Close ()=0
 Close connecti. More...
 
virtual void Abort ()=0
 Abort connection. More...
 
virtual void SetTimeout (size_t nof_secs)=0
 Set connection timeout. More...
 
virtual void SetCancelTimeout (size_t)
 Set timeout for command cancellation and connection closing. More...
 
virtual size_t GetTimeout (void) const
 Get connection timeout. More...
 
virtual size_t GetCancelTimeout (void) const
 Get timeout for command cancellation and connection closing. More...
 
virtual void MsgToEx (bool v)=0
 If enabled, redirects all error messages to CDB_MultiEx object (see below). More...
 
virtual CDB_MultiExGetErrorAsEx ()=0
 Returns all error messages as a CDB_MultiEx object. More...
 
virtual string GetErrorInfo ()=0
 Returns all error messages as a single string. More...
 
virtual CDB_ConnectionGetCDB_Connection ()=0
 Returns the internal driver connection object. More...
 

Detailed Description

Definition at line 727 of file dbapi.hpp.


The documentation for this class was generated from the following files:
Modified on Thu Feb 29 12:19:43 2024 by modify_doxy.py rev. 669887