NCBI C++ ToolKit
|
Search Toolkit Book for impl::CResult
#include <dbapi/driver/impl/dbapi_impl_result.hpp>
Public Member Functions | |
CResult (void) | |
virtual | ~CResult (void) |
virtual EDB_ResType | ResultType (void) const =0 |
Get type of the result. More... | |
virtual const CDBParams & | GetDefineParams (void) const |
virtual bool | Fetch (void)=0 |
Fetch next row. More... | |
virtual int | CurrentItemNo (void) const =0 |
Return current item number we can retrieve (0,1,...) Return "-1" if no more items left (or available) to read. More... | |
virtual int | GetColumnNum (void) const =0 |
Return number of columns in the recordset. More... | |
virtual CDB_Object * | GetItem (CDB_Object *item_buf=0, I_Result::EGetItem policy=I_Result::eAppendLOB)=0 |
Get a result item (you can use either GetItem or ReadItem). More... | |
virtual size_t | ReadItem (void *buffer, size_t buffer_size, bool *is_null=0)=0 |
Read a result item body (for BLOB columns, mostly). More... | |
virtual I_BlobDescriptor * | GetBlobDescriptor (void)=0 |
Get a descriptor for a BLOB column (for SendData). More... | |
I_BlobDescriptor * | GetImageOrTextDescriptor (void) |
virtual bool | SkipItem (void)=0 |
Skip result item. More... | |
void | AttachTo (CDB_Result *interface) |
const CDB_Params & | GetDefineParamsImpl (void) const |
CDB_Params & | GetDefineParamsImpl (void) |
Protected Attributes | |
CDB_Params | m_DefineParams |
CCachedRowInfo | m_CachedRowInfo |
Private Member Functions | |
void | Release (void) |
void | DetachInterface (void) |
Private Attributes | |
CInterfaceHook< CDB_Result > | m_Interface |
Friends | |
class | ncbi::CDB_Result |
CResult::
Definition at line 48 of file dbapi_impl_result.hpp.
CResult::CResult | ( | void | ) |
Definition at line 44 of file dbapi_impl_result.cpp.
|
virtual |
Definition at line 50 of file dbapi_impl_result.cpp.
References DetachInterface(), NCBI_CATCH_ALL_X, and NCBI_CURRENT_FUNCTION.
|
inline |
Definition at line 98 of file dbapi_impl_result.hpp.
References m_Interface.
Referenced by CDB_Result::CDB_Result().
|
pure virtual |
Return current item number we can retrieve (0,1,...) Return "-1" if no more items left (or available) to read.
Implemented in CODBC_CursorResult, CODBC_RowResult, CTL_CursorResultExpl, CTL_RowResult, and CMySQL_RowResult.
Referenced by CDB_Result::CurrentItemNo().
|
inlineprivate |
Definition at line 123 of file dbapi_impl_result.hpp.
References CInterfaceHook< I >::DetachInterface(), and m_Interface.
Referenced by Release(), and ~CResult().
|
pure virtual |
Fetch next row.
Implemented in CODBC_CursorResultExpl, CODBC_CursorResult, CODBC_RowResult, CTL_CursorResultExpl, CTL_CursorResult, CTL_RowResult, and CMySQL_RowResult.
Referenced by CDB_Result::Fetch().
|
pure virtual |
Get a descriptor for a BLOB column (for SendData).
Return NULL if this result doesn't (or can't) have a BLOB descriptor. NOTE: you need to call ReadItem (maybe even with buffer_size == 0) before calling this method!
Implemented in CODBC_CursorResult, CODBC_RowResult, CTL_CursorResultExpl, CTL_RowResult, and CMySQL_RowResult.
Referenced by CDB_Result::GetBlobDescriptor(), and GetImageOrTextDescriptor().
|
pure virtual |
Return number of columns in the recordset.
Implemented in CODBC_CursorResult, CODBC_RowResult, CMySQL_RowResult, CTL_CursorResultExpl, and CTL_RowResult.
Referenced by CDB_Result::GetColumnNum().
Reimplemented in CODBC_CursorResult.
Definition at line 59 of file dbapi_impl_result.cpp.
References m_CachedRowInfo.
Referenced by CTL_RowResult::Fetch(), CTL_RowResult::GetBlobDescriptor(), CTL_RowResult::GetColumnNum(), CMySQL_RowResult::GetColumnNum(), CODBC_RowResult::GetColumnNum(), CDB_Result::GetDefineParams(), CTL_RowResult::GetItem(), CMySQL_RowResult::GetItem(), CODBC_RowResult::GetItem(), CDB_Result::ItemDataType(), CDB_Result::ItemMaxSize(), CDB_Result::ItemName(), CDB_Result::NofItems(), CTL_RowResult::ReadItem(), CODBC_RowResult::ReadItem(), CTL_RowResult::SkipItem(), CTL_CursorResult::SkipItem(), and CODBC_RowResult::SkipItem().
|
inline |
Definition at line 107 of file dbapi_impl_result.hpp.
References m_DefineParams.
|
inline |
Definition at line 103 of file dbapi_impl_result.hpp.
References m_DefineParams.
|
inline |
Definition at line 92 of file dbapi_impl_result.hpp.
References GetBlobDescriptor().
|
pure virtual |
Get a result item (you can use either GetItem or ReadItem).
If "item_buf" is not NULL, then use "*item_buf" (its type should be compatible with the type of retrieved item!) to retrieve the item to; otherwise allocate new "CDB_Object".
Implemented in CODBC_CursorResult, CTL_CursorResultExpl, CODBC_RowResult, CMySQL_RowResult, and CTL_RowResult.
Referenced by CDB_Result::GetItem().
|
pure virtual |
Read a result item body (for BLOB columns, mostly).
Return number of successfully read bytes. Set "*is_null" to TRUE if the item is <NULL>. Throw an exception on any error.
Implemented in CODBC_CursorResult, CODBC_RowResult, CMySQL_RowResult, CTL_CursorResultExpl, and CTL_RowResult.
Referenced by CDB_Result::ReadItem().
|
inlineprivate |
Definition at line 117 of file dbapi_impl_result.hpp.
References DetachInterface().
Referenced by CDB_Result::~CDB_Result().
|
pure virtual |
Get type of the result.
Implemented in CODBC_CursorResult, CODBC_ParamResult, CODBC_StatusResult, CODBC_RowResult, CTL_CursorResultExpl, CTL_CursorResult, CTL_StatusResult, CTL_ComputeResult, CTL_ParamResult, CTL_RowResult, and CMySQL_RowResult.
Referenced by CDB_Result::ResultType().
|
pure virtual |
Skip result item.
Implemented in CODBC_CursorResult, CODBC_RowResult, CTL_CursorResultExpl, CTL_CursorResult, CTL_RowResult, and CMySQL_RowResult.
Referenced by CDB_Result::SkipItem().
|
friend |
Definition at line 50 of file dbapi_impl_result.hpp.
|
protected |
Definition at line 114 of file dbapi_impl_result.hpp.
Referenced by CMySQL_RowResult::CMySQL_RowResult(), CODBC_RowResult::CODBC_RowResult(), CTL_RowResult::CTL_RowResult(), CTL_CursorResultExpl::Fetch(), and GetDefineParams().
|
protected |
Definition at line 113 of file dbapi_impl_result.hpp.
Referenced by GetDefineParamsImpl().
|
private |
Definition at line 128 of file dbapi_impl_result.hpp.
Referenced by AttachTo(), and DetachInterface().