NCBI C++ ToolKit
|
Search Toolkit Book for CODBC_RPCCmd
#include <dbapi/driver/odbc/interfaces.hpp>
Protected Member Functions | |
CODBC_RPCCmd (CODBC_Connection &conn, const string &proc_name) | |
virtual | ~CODBC_RPCCmd (void) |
virtual CDBParams & | GetBindParams (void) |
Binding. More... | |
virtual bool | Send (void) |
Send command to the server. More... | |
virtual bool | Cancel (void) |
Cancel the command execution. More... | |
virtual CDB_Result * | Result (void) |
Get result set. More... | |
virtual bool | HasMoreResults (void) const |
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... | |
Protected Member Functions inherited from CStatementBase | |
string | Type2String (const CDB_Object ¶m) const |
bool | x_BindParam_ODBC (const CDB_Object ¶m, CMemPot &bind_guard, SQLLEN *indicator_base, unsigned int pos) const |
SQLSMALLINT | x_GetCType (const CDB_Object ¶m) const |
SQLSMALLINT | x_GetSQLType (const CDB_Object ¶m) const |
SQLULEN | x_GetMaxDataSize (const CDB_Object ¶m) const |
SQLLEN | x_GetCurDataSize (const CDB_Object ¶m) const |
SQLLEN | x_GetIndicator (const CDB_Object ¶m) const |
SQLPOINTER | x_GetData (const CDB_Object ¶m, CMemPot &bind_guard) 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_Params & | GetBindParamsImpl (void) const |
CDB_Params & | GetBindParamsImpl (void) |
const CDB_Params & | GetDefineParamsImpl (void) const |
CDB_Params & | GetDefineParamsImpl (void) |
virtual CDB_Result * | OpenCursor (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_SendDataCmd * | SendDataCmd (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::CConnection & | GetConnImpl (void) const |
Private Member Functions | |
bool | x_AssignParams (string &cmd, string &q_exec, string &q_select, CMemPot &bind_guard, SQLLEN *indicator) |
bool | xCheck4MoreResults (void) |
Private Attributes | |
bool | m_HasStatus |
bool | m_HasMoreResults |
impl::CResult * | m_Res |
unique_ptr< CDBParams > | m_InParams |
Friends | |
class | CODBC_Connection |
Additional Inherited Members | |
Public Member Functions inherited from CStatementBase | |
CStatementBase (CODBC_Connection &conn, const string &query) | |
CStatementBase (CODBC_Connection &conn, const string &cursor_name, const string &query) | |
~CStatementBase (void) | |
SQLHSTMT | GetHandle (void) const |
CODBC_Connection & | GetConnection (void) |
const CODBC_Connection & | GetConnection (void) const |
void | SetDbgInfo (const string &msg) |
const CODBC_Connection::TDbgInfo & | GetDbgInfo (void) const |
void | ReportErrors (void) const |
void | ReportError (CDB_Exception &ex) const |
const CDBParams & | GetBindParams (void) const |
bool | CheckRC (int rc) const |
int | CheckSIE (int rc, const char *msg, unsigned int msg_num) const |
int | CheckSIENd (int rc, const char *msg, unsigned int msg_num) const |
bool | Close (void) const |
bool | Unbind (void) const |
bool | ResetParams (void) const |
bool | IsMultibyteClientEncoding (void) const |
EEncoding | GetClientEncoding (void) const |
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 |
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 CDBParams & | GetDefineParams (void) |
Get meta-information about defined parameters. More... | |
const CDBParams * | GetLastParams (void) const |
bool | More (const string &query_text) |
Add more text to the language command. More... | |
const string & | GetQuery (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) |
Static Public Member Functions inherited from impl::CCommand | |
static CDB_Result * | Create_Result (CResult &result) |
Protected Attributes inherited from CStatementBase | |
SQLLEN | m_RowCount |
Definition at line 516 of file interfaces.hpp.
|
protected |
Definition at line 65 of file rpc.cpp.
References CStatementBase::SetDbgInfo().
|
protectedvirtual |
Definition at line 297 of file rpc.cpp.
References Cancel(), impl::CBaseCmd::DetachInterface(), impl::CConnection::DropCmd(), CStatementBase::GetConnection(), NCBI_CATCH_ALL_X, and NCBI_CURRENT_FUNCTION.
|
protectedvirtual |
Cancel the command execution.
Reimplemented from impl::CBaseCmd.
Definition at line 190 of file rpc.cpp.
References CStatementBase::Close(), m_Res, CStatementBase::ResetParams(), impl::CCmdBase::SetWasSent(), and impl::CCmdBase::WasSent().
Referenced by Send(), and ~CODBC_RPCCmd().
|
protectedvirtual |
Binding.
Get meta-information about binded parameters.
Reimplemented from CStatementBase.
Definition at line 78 of file rpc.cpp.
References impl::CBaseCmd::GetBindParamsImpl(), impl::CCmdBase::GetConnImpl(), impl::CBaseCmd::GetQuery(), m_InParams, and NULL.
|
protectedvirtual |
Reimplemented from impl::CBaseCmd.
Definition at line 285 of file rpc.cpp.
References m_HasMoreResults.
|
protectedvirtual |
Get result set.
Reimplemented from impl::CBaseCmd.
Definition at line 212 of file rpc.cpp.
References _T_NCBI_ODBC, buffer, CStatementBase::CheckSIE(), impl::CCommand::Create_Result(), DATABASE_DRIVER_ERROR, CStatementBase::GetDbgInfo(), CStatementBase::GetHandle(), l(), m_HasMoreResults, m_HasStatus, m_Res, CStatementBase::m_RowCount, impl::CCmdBase::SetWasSent(), SQL_DESC_LABEL, SQLColAttribute(), SQLLEN, SQLNumResultCols(), SQLRowCount(), util::strcmp(), impl::CCmdBase::WasSent(), and xCheck4MoreResults().
|
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).
Reimplemented from CStatementBase.
Definition at line 291 of file rpc.cpp.
References CStatementBase::m_RowCount.
|
protectedvirtual |
Send command to the server.
Reimplemented from impl::CBaseCmd.
Definition at line 93 of file rpc.cpp.
References CMemPot::Alloc(), Cancel(), DATABASE_DRIVER_ERROR, impl::CBaseCmd::GetBindParamsImpl(), CStatementBase::GetClientEncoding(), CStatementBase::GetDbgInfo(), CStatementBase::GetHandle(), impl::CBaseCmd::GetQuery(), m_HasMoreResults, m_HasStatus, CStatementBase::m_RowCount, impl::CBaseCmd::NeedToRecompile(), impl::CDB_Params::NofParams(), CStatementBase::ReportErrors(), CStatementBase::ResetParams(), impl::CBaseCmd::SetHasFailed(), impl::CCmdBase::SetWasSent(), SQL_ERROR, SQL_INVALID_HANDLE, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQLExecDirect(), SQLLEN, x_AssignParams(), and x_MakeTSqlString().
|
private |
Definition at line 310 of file rpc.cpp.
References cmd, impl::CDB_Params::fOutput, impl::CBaseCmd::GetBindParamsImpl(), impl::CDB_Params::GetParam(), impl::CDB_Params::GetParamName(), impl::CDB_Params::GetParamStatus(), CDB_Object::IsNULL(), impl::CDB_Params::LockBinding(), n, impl::CDB_Params::NofParams(), SQL_NULL_DATA, type, CStatementBase::Type2String(), and CStatementBase::x_BindParam_ODBC().
Referenced by Send().
|
private |
Definition at line 362 of file rpc.cpp.
References DATABASE_DRIVER_ERROR, CStatementBase::GetDbgInfo(), CStatementBase::GetHandle(), CStatementBase::ReportErrors(), SQL_ERROR, SQL_NO_DATA, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, and SQLMoreResults().
Referenced by Result().
|
friend |
Definition at line 519 of file interfaces.hpp.
|
private |
Definition at line 541 of file interfaces.hpp.
Referenced by HasMoreResults(), Result(), and Send().
|
private |
Definition at line 540 of file interfaces.hpp.
|
private |
Definition at line 544 of file interfaces.hpp.
Referenced by GetBindParams().
|
private |
Definition at line 542 of file interfaces.hpp.