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

Search Toolkit Book for CTL_CursorCmdExpl

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

+ Inheritance diagram for CTL_CursorCmdExpl:
+ Collaboration diagram for CTL_CursorCmdExpl:

Protected Member Functions

 CTL_CursorCmdExpl (CTL_Connection &con, const string &cursor_name, const string &query, unsigned int fetch_size)
 
virtual ~CTL_CursorCmdExpl (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 int RowCount (void) const
 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...
 
virtual bool CloseCursor (void)
 Close the cursor. More...
 

Private Member Functions

CTL_CursorResultExplGetResultSet (void) const
 
void SetResultSet (CTL_CursorResultExpl *res)
 
void ClearResultSet (void)
 
const string GetCombinedQuery (void) const
 
bool x_AssignParams (void)
 
I_BlobDescriptorx_GetBlobDescriptor (unsigned int item_num)
 
- Private Member Functions inherited from CTL_Cmd
 CTL_Cmd (CTL_Connection &conn, const string &query)
 
 CTL_Cmd (CTL_Connection &conn, const string &cursor_name, const string &query)
 
virtual ~CTL_Cmd (void)
 
CS_COMMANDx_GetSybaseCmd (void) const
 
void SetSybaseCmd (CS_COMMAND *cmd)
 
bool AssignCmdParam (CDB_Object &param, const string &param_name, CS_DATAFMT &param_fmt, bool declare_only=false)
 
void GetRowCount (int *cnt)
 
CTL_RowResultGetResult (void)
 
void DeleteResult (void)
 
void DeleteResultInternal (void)
 
void MarkEndOfReply (void)
 
bool HaveResult (void) const
 
void SetResult (CTL_RowResult *result)
 
CTL_RowResultMakeCursorResult (void)
 
CTL_RowResultMakeRowResult (void)
 
CTL_RowResultMakeParamResult (void)
 
CTL_RowResultMakeComputeResult (void)
 
CTL_RowResultMakeStatusResult (void)
 
bool ProcessResultInternal (CDB_Result &res)
 
bool ProcessResultInternal (CS_INT res_type)
 
CS_RETCODE CheckSFB_Internal (CS_RETCODE rc, const char *msg, unsigned int msg_num)
 
void DropSybaseCmd (void)
 
- Private Member Functions inherited from CTL_CmdBase
 CTL_CmdBase (CTL_Connection &conn, const string &query)
 
 CTL_CmdBase (CTL_Connection &conn, const string &cursor_name, const string &query)
 
virtual ~CTL_CmdBase (void)
 
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)
 
- Private 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
 
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
 
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)
 
bool CursorIsOpen (void) const
 
void SetCursorOpen (bool flag=true)
 
bool CursorIsDeclared (void) const
 
void SetCursorDeclared (bool flag=true)
 
- Private Member Functions inherited from impl::CCmdBase
 CCmdBase (impl::CConnection &conn)
 
virtual ~CCmdBase ()
 
bool WasSent (void) const
 
void SetWasSent (bool flag=true)
 
impl::CConnectionGetConnImpl (void) const
 
- Private Member Functions inherited from impl::CCommand
virtual ~CCommand (void)
 
void Release (void)
 

Private Attributes

unique_ptr< CTL_LangCmdm_LCmd
 
unique_ptr< CTL_CursorResultExplm_Res
 
string m_CombinedQuery
 
unsigned int m_FetchSize
 
- Private Attributes inherited from CTL_CmdBase
int m_RowCount
 
CRef< TDbgInfom_DbgInfo
 

Friends

class CTL_Connection
 

Additional Inherited Members

- Private Types inherited from CTL_CmdBase
enum  ECancelType { eAsyncCancel = CS_CANCEL_ATTN , eSyncCancel = CS_CANCEL_ALL }
 
typedef CTL_Connection::TDbgInfo TDbgInfo
 
- Static Private Member Functions inherited from impl::CCommand
static CDB_ResultCreate_Result (CResult &result)
 

Detailed Description

Definition at line 958 of file interfaces.hpp.

Constructor & Destructor Documentation

◆ CTL_CursorCmdExpl()

CTL_CursorCmdExpl::CTL_CursorCmdExpl ( CTL_Connection con,
const string cursor_name,
const string query,
unsigned int  fetch_size 
)
protected

Definition at line 535 of file cursor.cpp.

References query, and CTL_CmdBase::SetExecCntxInfo().

◆ ~CTL_CursorCmdExpl()

CTL_CursorCmdExpl::~CTL_CursorCmdExpl ( void  )
protectedvirtual

Member Function Documentation

◆ ClearResultSet()

void CTL_CursorCmdExpl::ClearResultSet ( void  )
inlineprivate

Definition at line 1631 of file interfaces.hpp.

References NULL.

◆ CloseCursor()

bool CTL_CursorCmdExpl::CloseCursor ( void  )
protectedvirtual

◆ Delete()

bool CTL_CursorCmdExpl::Delete ( const string table_name)
protectedvirtual

Delete the last fetched row.

NOTE: the cursor must be declared for delete in CDB_Connection::Cursor()

Reimplemented from impl::CBaseCmd.

Definition at line 729 of file cursor.cpp.

References cmd, impl::CBaseCmd::CursorIsOpen(), DATABASE_DRIVER_ERROR_EX, impl::CBaseCmd::GetCmdName(), CTL_CmdBase::GetConnection(), CTL_CmdBase::GetDbgInfo(), CTL_Connection::LangCmd(), m_LCmd, r(), and table_name.

◆ GetCombinedQuery()

const string CTL_CursorCmdExpl::GetCombinedQuery ( void  ) const
inlineprivate

Definition at line 985 of file interfaces.hpp.

Referenced by OpenCursor().

◆ GetResultSet()

CTL_CursorResultExpl * CTL_CursorCmdExpl::GetResultSet ( void  ) const
inlineprivate

Definition at line 1617 of file interfaces.hpp.

Referenced by OpenCursor().

◆ OpenCursor()

CDB_Result * CTL_CursorCmdExpl::OpenCursor ( void  )
protectedvirtual

◆ RowCount()

int CTL_CursorCmdExpl::RowCount ( void  ) const
protectedvirtual

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).

Implements impl::CBaseCmd.

Definition at line 767 of file cursor.cpp.

References CTL_CmdBase::m_RowCount.

◆ SendDataCmd()

CDB_SendDataCmd * CTL_CursorCmdExpl::SendDataCmd ( unsigned int  item_num,
size_t  size,
bool  log_it = true,
bool  dump_results = true 
)
protectedvirtual

◆ SetResultSet()

void CTL_CursorCmdExpl::SetResultSet ( CTL_CursorResultExpl res)
inlineprivate

Definition at line 1624 of file interfaces.hpp.

◆ Update()

bool CTL_CursorCmdExpl::Update ( const string table_name,
const string upd_query 
)
protectedvirtual

Update the last fetched row.

NOTE: the cursor must be declared for update in CDB_Connection::Cursor()

Reimplemented from impl::CBaseCmd.

Definition at line 632 of file cursor.cpp.

References cmd, impl::CBaseCmd::CursorIsOpen(), DATABASE_DRIVER_ERROR_EX, impl::CBaseCmd::GetCmdName(), CTL_CmdBase::GetConnection(), CTL_CmdBase::GetDbgInfo(), m_LCmd, and r().

◆ UpdateBlob()

bool CTL_CursorCmdExpl::UpdateBlob ( unsigned int  item_num,
CDB_Stream data,
bool  log_it = true 
)
protectedvirtual

Reimplemented from impl::CBaseCmd.

Definition at line 691 of file cursor.cpp.

References data, CTL_CmdBase::GetConnection(), m_LCmd, r(), x_GetBlobDescriptor(), and CTL_Connection::x_SendData().

◆ x_AssignParams()

bool CTL_CursorCmdExpl::x_AssignParams ( void  )
private

◆ x_GetBlobDescriptor()

I_BlobDescriptor * CTL_CursorCmdExpl::x_GetBlobDescriptor ( unsigned int  item_num)
private

Friends And Related Function Documentation

◆ CTL_Connection

friend class CTL_Connection
friend

Definition at line 960 of file interfaces.hpp.

Member Data Documentation

◆ m_CombinedQuery

string CTL_CursorCmdExpl::m_CombinedQuery
private

Definition at line 996 of file interfaces.hpp.

Referenced by x_AssignParams().

◆ m_FetchSize

unsigned int CTL_CursorCmdExpl::m_FetchSize
private

Definition at line 997 of file interfaces.hpp.

◆ m_LCmd

unique_ptr<CTL_LangCmd> CTL_CursorCmdExpl::m_LCmd
private

◆ m_Res

unique_ptr<CTL_CursorResultExpl> CTL_CursorCmdExpl::m_Res
private

Definition at line 995 of file interfaces.hpp.

Referenced by CloseCursor(), OpenCursor(), and x_GetBlobDescriptor().


The documentation for this class was generated from the following files:
Modified on Wed May 22 11:35:11 2024 by modify_doxy.py rev. 669887