NCBI C++ ToolKit
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
CTL_CmdBase Class Reference

Search Toolkit Book for CTL_CmdBase

#include <dbapi/driver/ctlib/interfaces.hpp>

+ Inheritance diagram for CTL_CmdBase:
+ Collaboration diagram for CTL_CmdBase:

Classes

class  CTempVarChar
 

Public Member Functions

 CTL_CmdBase (CTL_Connection &conn, const string &query)
 
 CTL_CmdBase (CTL_Connection &conn, const string &cursor_name, const string &query)
 
virtual ~CTL_CmdBase (void)
 
- Public Member Functions inherited from impl::CBaseCmd
 CBaseCmd (impl::CConnection &conn, const string &query)
 
 CBaseCmd (impl::CConnection &conn, const string &cursor_name, const string &query)
 
virtual ~CBaseCmd (void)
 
virtual bool Send (void)
 Send command to the server. More...
 
virtual bool Cancel (void)
 Cancel the command execution. More...
 
bool WasCanceled (void) const
 
virtual CDB_ResultResult (void)
 Get result set. More...
 
virtual bool HasMoreResults (void) const
 
virtual bool HasFailed (void) const
 
virtual int RowCount (void) const =0
 Get the number of rows affected by the command Special case: negative on error or if there is no way that this command could ever affect any rows (like PRINT). More...
 
void DumpResults (void)
 Dump the results of the command if result processor is installed for this connection, it will be called for each result set. More...
 
virtual CDBParamsGetBindParams (void)
 Binding. More...
 
virtual CDBParamsGetDefineParams (void)
 Get meta-information about defined parameters. More...
 
const CDBParamsGetLastParams (void) const
 
bool More (const string &query_text)
 Add more text to the language command. More...
 
const stringGetQuery (void) const
 
string GetCmdName (void) const
 
virtual void SetHints (CTempString hints)
 Set hints by one call. More...
 
virtual void AddHint (CDB_BCPInCmd::EBCP_Hints hint, unsigned int value)
 Add hint with value. More...
 
virtual void AddOrderHint (CTempString columns)
 Add "ORDER" hint. More...
 
virtual bool CommitBCPTrans (void)
 Complete batch – to store all rows transferred by far in this batch into the table. More...
 
virtual bool EndBCP (void)
 Complete the BCP and store all rows transferred in last batch into the table. More...
 
unsigned int GetRowsInCurrentBatch (void) const
 
- Public Member Functions inherited from impl::CCmdBase
 CCmdBase (impl::CConnection &conn)
 
virtual ~CCmdBase ()
 
bool WasSent (void) const
 
- Public Member Functions inherited from impl::CCommand
virtual ~CCommand (void)
 
void Release (void)
 

Protected Types

enum  ECancelType { eAsyncCancel = CS_CANCEL_ATTN , eSyncCancel = CS_CANCEL_ALL }
 
typedef CTL_Connection::TDbgInfo TDbgInfo
 

Protected Member Functions

CS_RETCODE Check (CS_RETCODE rc)
 
CTL_ConnectionGetConnection (void)
 
const CTL_ConnectionGetConnection (void) const
 
void DropCmd (impl::CCommand &cmd)
 
bool x_SendData (I_BlobDescriptor &desc, CDB_Stream &img, bool log_it=true)
 
CDB_SendDataCmdConnSendDataCmd (I_BlobDescriptor &desc, size_t data_size, bool log_it=true, bool dump_results=true)
 
bool IsMultibyteClientEncoding (void) const
 
EEncoding GetClientEncoding (void) const
 
virtual bool x_Cancel (ECancelType)
 
void SetExecCntxInfo (const string &info)
 
const stringGetExecCntxInfo (void) const
 
bool IsDead (void) const
 
void SetDead (bool flag=true)
 
void CheckIsDead (void)
 
virtual void SetHasFailed (bool flag=true)
 
const TDbgInfoGetDbgInfo (void) const
 
bool GetTimedOut (void) const
 
void SetTimedOut (bool val)
 
ERetriable GetRetriable (void) const
 
void SetRetriable (ERetriable val)
 
void EnsureActiveStatus (void)
 
- Protected Member Functions inherited from impl::CBaseCmd
void DetachInterface (void)
 
void SetRecompile (bool recompile=true)
 Set the "recompile before execute" flag for the stored proc. More...
 
bool NeedToRecompile (void) const
 
const CDB_ParamsGetBindParamsImpl (void) const
 
CDB_ParamsGetBindParamsImpl (void)
 
const CDB_ParamsGetDefineParamsImpl (void) const
 
CDB_ParamsGetDefineParamsImpl (void)
 
virtual CDB_ResultOpenCursor (void)
 Open the cursor. More...
 
virtual bool Update (const string &table_name, const string &upd_query)
 Update the last fetched row. More...
 
virtual bool UpdateBlob (unsigned int item_num, CDB_Stream &data, bool log_it=true)
 
virtual CDB_SendDataCmdSendDataCmd (unsigned int item_num, size_t size, bool log_it=true, bool dump_results=true)
 
virtual bool Delete (const string &table_name)
 Delete the last fetched row. More...
 
virtual bool CloseCursor (void)
 Close the cursor. More...
 
bool CursorIsOpen (void) const
 
void SetCursorOpen (bool flag=true)
 
bool CursorIsDeclared (void) const
 
void SetCursorDeclared (bool flag=true)
 
- Protected Member Functions inherited from impl::CCmdBase
void SetWasSent (bool flag=true)
 
impl::CConnectionGetConnImpl (void) const
 

Protected Attributes

int m_RowCount
 
CRef< TDbgInfom_DbgInfo
 

Private Attributes

bool m_IsActive
 
bool m_TimedOut
 
ERetriable m_Retriable
 

Friends

class CTL_Connection
 

Additional Inherited Members

- Static Public Member Functions inherited from impl::CCommand
static CDB_ResultCreate_Result (CResult &result)
 

Detailed Description

Definition at line 613 of file interfaces.hpp.

Member Typedef Documentation

◆ TDbgInfo

Definition at line 710 of file interfaces.hpp.

Member Enumeration Documentation

◆ ECancelType

enum CTL_CmdBase::ECancelType
protected
Enumerator
eAsyncCancel 
eSyncCancel 

Definition at line 661 of file interfaces.hpp.

Constructor & Destructor Documentation

◆ CTL_CmdBase() [1/2]

CTL_CmdBase::CTL_CmdBase ( CTL_Connection conn,
const string query 
)

Definition at line 62 of file lang_cmd.cpp.

References conn.

◆ CTL_CmdBase() [2/2]

CTL_CmdBase::CTL_CmdBase ( CTL_Connection conn,
const string cursor_name,
const string query 
)

Definition at line 77 of file lang_cmd.cpp.

References conn.

◆ ~CTL_CmdBase()

CTL_CmdBase::~CTL_CmdBase ( void  )
virtual

Definition at line 93 of file lang_cmd.cpp.

References GetConnection(), CTL_Connection::m_ActiveCmd, m_IsActive, and NULL.

Member Function Documentation

◆ Check()

CS_RETCODE CTL_CmdBase::Check ( CS_RETCODE  rc)
protected

◆ CheckIsDead()

void CTL_CmdBase::CheckIsDead ( void  )
inlineprotected

◆ ConnSendDataCmd()

CDB_SendDataCmd * CTL_CmdBase::ConnSendDataCmd ( I_BlobDescriptor desc,
size_t  data_size,
bool  log_it = true,
bool  dump_results = true 
)
inlineprotected

Definition at line 1504 of file interfaces.hpp.

References GetConnection(), and CTL_Connection::SendDataCmd().

Referenced by CTL_CursorCmd::SendDataCmd().

◆ DropCmd()

void CTL_CmdBase::DropCmd ( impl::CCommand cmd)
inlineprotected

◆ EnsureActiveStatus()

void CTL_CmdBase::EnsureActiveStatus ( void  )
protected

Definition at line 114 of file lang_cmd.cpp.

References conn, GetConnection(), and m_IsActive.

Referenced by CTL_LangCmd::Send(), and CTL_SendDataCmd::SendChunk().

◆ GetClientEncoding()

EEncoding CTL_CmdBase::GetClientEncoding ( void  ) const
inlineprotected

Definition at line 656 of file interfaces.hpp.

◆ GetConnection() [1/2]

CTL_Connection & CTL_CmdBase::GetConnection ( void  )
inlineprotected

◆ GetConnection() [2/2]

const CTL_Connection & CTL_CmdBase::GetConnection ( void  ) const
inlineprotected

Definition at line 1483 of file interfaces.hpp.

References impl::CCmdBase::GetConnImpl().

◆ GetDbgInfo()

const TDbgInfo& CTL_CmdBase::GetDbgInfo ( void  ) const
inlineprotected

◆ GetExecCntxInfo()

const string& CTL_CmdBase::GetExecCntxInfo ( void  ) const
inlineprotected

Definition at line 679 of file interfaces.hpp.

◆ GetRetriable()

ERetriable CTL_CmdBase::GetRetriable ( void  ) const
inlineprotected

Definition at line 727 of file interfaces.hpp.

Referenced by Check(), and CTL_LRCmd::MakeResultInternal().

◆ GetTimedOut()

bool CTL_CmdBase::GetTimedOut ( void  ) const
inlineprotected

Definition at line 717 of file interfaces.hpp.

Referenced by CTL_LRCmd::MakeResultInternal().

◆ IsDead()

bool CTL_CmdBase::IsDead ( void  ) const
inlineprotected

◆ IsMultibyteClientEncoding()

bool CTL_CmdBase::IsMultibyteClientEncoding ( void  ) const
inlineprotected

Definition at line 651 of file interfaces.hpp.

◆ SetDead()

void CTL_CmdBase::SetDead ( bool  flag = true)
inlineprotected

Definition at line 688 of file interfaces.hpp.

Referenced by CTL_LangCmd::Close(), and CTL_BCPInCmd::Close().

◆ SetExecCntxInfo()

void CTL_CmdBase::SetExecCntxInfo ( const string info)
inlineprotected

◆ SetHasFailed()

virtual void CTL_CmdBase::SetHasFailed ( bool  flag = true)
inlineprotectedvirtual

◆ SetRetriable()

void CTL_CmdBase::SetRetriable ( ERetriable  val)
inlineprotected

Definition at line 732 of file interfaces.hpp.

References val.

Referenced by Check().

◆ SetTimedOut()

void CTL_CmdBase::SetTimedOut ( bool  val)
inlineprotected

Definition at line 722 of file interfaces.hpp.

References val.

Referenced by Check().

◆ x_Cancel()

virtual bool CTL_CmdBase::x_Cancel ( ECancelType  )
inlineprotectedvirtual

Reimplemented in CTL_LRCmd.

Definition at line 667 of file interfaces.hpp.

◆ x_SendData()

bool CTL_CmdBase::x_SendData ( I_BlobDescriptor desc,
CDB_Stream img,
bool  log_it = true 
)
inlineprotected

Definition at line 1497 of file interfaces.hpp.

References GetConnection(), and CTL_Connection::x_SendData().

Referenced by CTL_CursorCmd::UpdateBlob().

Friends And Related Function Documentation

◆ CTL_Connection

friend class CTL_Connection
friend

Definition at line 615 of file interfaces.hpp.

Member Data Documentation

◆ m_DbgInfo

CRef<TDbgInfo> CTL_CmdBase::m_DbgInfo
protected

Definition at line 741 of file interfaces.hpp.

◆ m_IsActive

bool CTL_CmdBase::m_IsActive
private

◆ m_Retriable

ERetriable CTL_CmdBase::m_Retriable
private

Definition at line 749 of file interfaces.hpp.

◆ m_RowCount

int CTL_CmdBase::m_RowCount
protected

◆ m_TimedOut

bool CTL_CmdBase::m_TimedOut
private

Definition at line 748 of file interfaces.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Apr 12 17:16:38 2024 by modify_doxy.py rev. 669887