NCBI C++ ToolKit
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
impl::CResult Class Referenceabstract

Search Toolkit Book for impl::CResult

CResult:: More...

#include <dbapi/driver/impl/dbapi_impl_result.hpp>

+ Inheritance diagram for impl::CResult:
+ Collaboration diagram for impl::CResult:

Public Member Functions

 CResult (void)
 
virtual ~CResult (void)
 
virtual EDB_ResType ResultType (void) const =0
 Get type of the result. More...
 
virtual const CDBParamsGetDefineParams (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_ObjectGetItem (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_BlobDescriptorGetBlobDescriptor (void)=0
 Get a descriptor for a BLOB column (for SendData). More...
 
I_BlobDescriptorGetImageOrTextDescriptor (void)
 
virtual bool SkipItem (void)=0
 Skip result item. More...
 
void AttachTo (CDB_Result *interface)
 
const CDB_ParamsGetDefineParamsImpl (void) const
 
CDB_ParamsGetDefineParamsImpl (void)
 

Protected Attributes

CDB_Params m_DefineParams
 
CCachedRowInfo m_CachedRowInfo
 

Private Member Functions

void Release (void)
 
void DetachInterface (void)
 

Private Attributes

CInterfaceHook< CDB_Resultm_Interface
 

Friends

class ncbi::CDB_Result
 

Detailed Description

CResult::

Definition at line 48 of file dbapi_impl_result.hpp.

Constructor & Destructor Documentation

◆ CResult()

CResult::CResult ( void  )

Definition at line 44 of file dbapi_impl_result.cpp.

◆ ~CResult()

CResult::~CResult ( void  )
virtual

Definition at line 50 of file dbapi_impl_result.cpp.

References DetachInterface(), NCBI_CATCH_ALL_X, and NCBI_CURRENT_FUNCTION.

Member Function Documentation

◆ AttachTo()

void impl::CResult::AttachTo ( CDB_Result interface)
inline

Definition at line 98 of file dbapi_impl_result.hpp.

References m_Interface.

Referenced by CDB_Result::CDB_Result().

◆ CurrentItemNo()

virtual int impl::CResult::CurrentItemNo ( void  ) const
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().

◆ DetachInterface()

void impl::CResult::DetachInterface ( void  )
inlineprivate

Definition at line 123 of file dbapi_impl_result.hpp.

References CInterfaceHook< I >::DetachInterface(), and m_Interface.

Referenced by Release(), and ~CResult().

◆ Fetch()

virtual bool impl::CResult::Fetch ( void  )
pure virtual

◆ GetBlobDescriptor()

virtual I_BlobDescriptor* impl::CResult::GetBlobDescriptor ( void  )
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().

◆ GetColumnNum()

virtual int impl::CResult::GetColumnNum ( void  ) const
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().

◆ GetDefineParams()

const CDBParams & CResult::GetDefineParams ( void  ) const
virtual

◆ GetDefineParamsImpl() [1/2]

CDB_Params& impl::CResult::GetDefineParamsImpl ( void  )
inline

Definition at line 107 of file dbapi_impl_result.hpp.

References m_DefineParams.

◆ GetDefineParamsImpl() [2/2]

const CDB_Params& impl::CResult::GetDefineParamsImpl ( void  ) const
inline

Definition at line 103 of file dbapi_impl_result.hpp.

References m_DefineParams.

◆ GetImageOrTextDescriptor()

I_BlobDescriptor* impl::CResult::GetImageOrTextDescriptor ( void  )
inline

Definition at line 92 of file dbapi_impl_result.hpp.

References GetBlobDescriptor().

◆ GetItem()

virtual CDB_Object* impl::CResult::GetItem ( CDB_Object item_buf = 0,
I_Result::EGetItem  policy = I_Result::eAppendLOB 
)
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().

◆ ReadItem()

virtual size_t impl::CResult::ReadItem ( void *  buffer,
size_t  buffer_size,
bool is_null = 0 
)
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().

◆ Release()

void impl::CResult::Release ( void  )
inlineprivate

Definition at line 117 of file dbapi_impl_result.hpp.

References DetachInterface().

Referenced by CDB_Result::~CDB_Result().

◆ ResultType()

virtual EDB_ResType impl::CResult::ResultType ( void  ) const
pure virtual

◆ SkipItem()

virtual bool impl::CResult::SkipItem ( void  )
pure virtual

Friends And Related Function Documentation

◆ ncbi::CDB_Result

friend class ncbi::CDB_Result
friend

Definition at line 50 of file dbapi_impl_result.hpp.

Member Data Documentation

◆ m_CachedRowInfo

CCachedRowInfo impl::CResult::m_CachedRowInfo
protected

◆ m_DefineParams

CDB_Params impl::CResult::m_DefineParams
protected

Definition at line 113 of file dbapi_impl_result.hpp.

Referenced by GetDefineParamsImpl().

◆ m_Interface

CInterfaceHook<CDB_Result> impl::CResult::m_Interface
private

Definition at line 128 of file dbapi_impl_result.hpp.

Referenced by AttachTo(), and DetachInterface().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:30 2024 by modify_doxy.py rev. 669887