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

Search Toolkit Book for CMySQL_LangCmd

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

+ Inheritance diagram for CMySQL_LangCmd:
+ Collaboration diagram for CMySQL_LangCmd:

Public Member Functions

string EscapeString (const char *str, unsigned long len)
 
- 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)
 
bool WasCanceled (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
 
- 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

typedef CMySQL_Connection::TDbgInfo TDbgInfo
 

Protected Member Functions

 CMySQL_LangCmd (CMySQL_Connection &conn, const string &lang_query)
 
virtual ~CMySQL_LangCmd ()
 
virtual bool Send ()
 Send command to the server. More...
 
virtual bool Cancel ()
 Cancel the command execution. More...
 
virtual CDB_ResultResult ()
 Get result set. More...
 
virtual bool HasMoreResults () const
 
virtual bool HasFailed () const
 
virtual int RowCount () 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...
 
int LastInsertId () const
 
void SetExecCntxInfo (const string &info)
 
const stringGetExecCntxInfo (void) const
 
const TDbgInfoGetDbgInfo (void) const
 
- 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
 
virtual void SetHasFailed (bool flag=true)
 
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
 

Private Member Functions

CMySQL_ConnectionGetConnection (void)
 
const CMySQL_ConnectionGetConnection (void) const
 

Private Attributes

CMySQL_Connectionm_Connect
 
CRef< TDbgInfom_DbgInfo
 
bool m_HasMoreResults
 
bool m_IsActive
 

Friends

class CMySQL_Connection
 

Additional Inherited Members

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

Detailed Description

Definition at line 155 of file interfaces.hpp.

Member Typedef Documentation

◆ TDbgInfo

Definition at line 180 of file interfaces.hpp.

Constructor & Destructor Documentation

◆ CMySQL_LangCmd()

CMySQL_LangCmd::CMySQL_LangCmd ( CMySQL_Connection conn,
const string lang_query 
)
protected

Definition at line 49 of file lang_cmd.cpp.

References conn.

◆ ~CMySQL_LangCmd()

CMySQL_LangCmd::~CMySQL_LangCmd ( )
protectedvirtual

Member Function Documentation

◆ Cancel()

bool CMySQL_LangCmd::Cancel ( void  )
protectedvirtual

Cancel the command execution.

Reimplemented from impl::CBaseCmd.

Definition at line 80 of file lang_cmd.cpp.

Referenced by ~CMySQL_LangCmd().

◆ EscapeString()

string CMySQL_LangCmd::EscapeString ( const char *  str,
unsigned long  len 
)

Definition at line 133 of file lang_cmd.cpp.

References AutoArray< X, Del >::get(), len, m_Connect, CMySQL_Connection::m_MySQL, and str().

◆ GetConnection() [1/2]

CMySQL_Connection& CMySQL_LangCmd::GetConnection ( void  )
inlineprivate

Definition at line 192 of file interfaces.hpp.

References _ASSERT, and m_Connect.

Referenced by ~CMySQL_LangCmd().

◆ GetConnection() [2/2]

const CMySQL_Connection& CMySQL_LangCmd::GetConnection ( void  ) const
inlineprivate

Definition at line 198 of file interfaces.hpp.

References _ASSERT, and m_Connect.

◆ GetDbgInfo()

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

Definition at line 181 of file interfaces.hpp.

References m_DbgInfo.

Referenced by CMySQL_Connection::GetDbgInfo().

◆ GetExecCntxInfo()

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

Definition at line 175 of file interfaces.hpp.

References m_DbgInfo.

◆ HasFailed()

bool CMySQL_LangCmd::HasFailed ( void  ) const
protectedvirtual

Reimplemented from impl::CBaseCmd.

Definition at line 100 of file lang_cmd.cpp.

References m_Connect, and CMySQL_Connection::m_MySQL.

◆ HasMoreResults()

bool CMySQL_LangCmd::HasMoreResults ( void  ) const
protectedvirtual

Reimplemented from impl::CBaseCmd.

Definition at line 94 of file lang_cmd.cpp.

References m_HasMoreResults.

◆ LastInsertId()

int CMySQL_LangCmd::LastInsertId ( ) const
protected

Definition at line 123 of file lang_cmd.cpp.

References m_Connect, and CMySQL_Connection::m_MySQL.

◆ Result()

CDB_Result * CMySQL_LangCmd::Result ( void  )
protectedvirtual

Get result set.

Reimplemented from impl::CBaseCmd.

Definition at line 86 of file lang_cmd.cpp.

References _ASSERT, impl::CCommand::Create_Result(), m_Connect, and m_HasMoreResults.

◆ RowCount()

int CMySQL_LangCmd::RowCount ( ) 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 128 of file lang_cmd.cpp.

References m_Connect, and CMySQL_Connection::m_MySQL.

◆ Send()

bool CMySQL_LangCmd::Send ( void  )
protectedvirtual

◆ SetExecCntxInfo()

void CMySQL_LangCmd::SetExecCntxInfo ( const string info)
inlineprotected

Definition at line 171 of file interfaces.hpp.

References info, and m_DbgInfo.

Friends And Related Function Documentation

◆ CMySQL_Connection

friend class CMySQL_Connection
friend

Definition at line 190 of file interfaces.hpp.

Member Data Documentation

◆ m_Connect

CMySQL_Connection* CMySQL_LangCmd::m_Connect
private

◆ m_DbgInfo

CRef<TDbgInfo> CMySQL_LangCmd::m_DbgInfo
private

Definition at line 205 of file interfaces.hpp.

Referenced by GetDbgInfo(), GetExecCntxInfo(), and SetExecCntxInfo().

◆ m_HasMoreResults

bool CMySQL_LangCmd::m_HasMoreResults
private

Definition at line 206 of file interfaces.hpp.

Referenced by HasMoreResults(), Result(), and Send().

◆ m_IsActive

bool CMySQL_LangCmd::m_IsActive
private

Definition at line 207 of file interfaces.hpp.

Referenced by CMySQL_Connection::~CMySQL_Connection(), and ~CMySQL_LangCmd().


The documentation for this class was generated from the following files:
Modified on Wed May 29 18:38:20 2024 by modify_doxy.py rev. 669887