Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GraySQLite::cSQLiteStatement Class Reference

#include <cSQLite.h>

Inheritance diagram for GraySQLite::cSQLiteStatement:
GraySQLite::cSQLiteBase ISQLStatement Gray::cRefBase IUnknown

Public Member Functions

virtual ~cSQLiteStatement ()
 
virtual HRESULT CloseStatement (bool bDrop) override
 
virtual HRESULT ExecuteAndFetch (bool bResultsExpected) override
 
virtual void ExecCancel () override
 
virtual HRESULT FetchNext (bool bMore=false) override
 
virtual ITERATE_t ReadColumnCount () override
 
cSQLiteColumn GetColumn (cSQLiteCol_t iColumn=0) const
 
virtual bool ReadColumnInfo (SQL_COLUMN_t iColumn, OUT cSQLColumnInfo &info) override
 
virtual bool GetColumnVar (SQL_COLUMN_t iColumn, cSQLColumnInfo *pColInfo, OUT cVariant &vValRet) override
 
template<class T >
HRESULT Bind (SQL_COLUMN_t i, const T &value)
 
HRESULT BindBlob (SQL_COLUMN_t i, const void *value, int nSize)
 
HRESULT BindNull (SQL_COLUMN_t i)
 
 IUNKNOWN_DISAMBIG (SUPER_t)
 
virtual HRESULT FillException (cSQLException *pException=nullptr) override
 
- Public Member Functions inherited from GraySQLite::cSQLiteBase
 cSQLiteBase (::sqlite3 *pDB=nullptr)
 
 IUNKNOWN_DISAMBIG (SUPER_t)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Protected Member Functions

void ResetBind ()
 
void ResetBindCheck ()
 
HRESULT DoBind (SQL_COLUMN_t i, int value)
 
HRESULT DoBind (SQL_COLUMN_t i, sqlite3_int64 value)
 
HRESULT DoBind (SQL_COLUMN_t i, double value)
 
HRESULT DoBind (SQL_COLUMN_t i, const cString &value)
 
HRESULT DoBind (SQL_COLUMN_t i, const GChar_t *pszValue, StrLen_t iLen=-1)
 
HRESULT DoBind (SQL_COLUMN_t i, const void *pValue, size_t nSize)
 
HRESULT DoBind (SQL_COLUMN_t i)
 
 cSQLiteStatement (sqlite3 *pDb, const GChar_t *pszQueryStr)
 
- Protected Member Functions inherited from GraySQLite::cSQLiteBase
HRESULT ThrowOnError ()
 

Protected Attributes

::sqlite3_stmtm_pStmt
 Statement in action. More...
 
bool m_bNeedResetBind
 sqlite3_step has been called. need to call sqlite3_reset to clear binds to reuse this statement. More...
 

Friends

class cSQLiteDb
 

Additional Inherited Members

- Public Attributes inherited from GraySQLite::cSQLiteBase
::sqlite3m_pDB
 Pointer to the native DB provider / connection. More...
 
int m_nNativeError
 should be 'int' or SQL_RETURN_t ? SQLITE_OK, SQLITE_EMPTY More...
 

Constructor & Destructor Documentation

◆ cSQLiteStatement()

GraySQLite::cSQLiteStatement::cSQLiteStatement ( sqlite3 pDb,
const GChar_t pszQueryStr 
)
protected

◆ ~cSQLiteStatement()

GraySQLite::cSQLiteStatement::~cSQLiteStatement ( )
virtual

Member Function Documentation

◆ Bind()

template<class T >
HRESULT GraySQLite::cSQLiteStatement::Bind ( SQL_COLUMN_t  i,
const T &  value 
)
inline

◆ BindBlob()

HRESULT GraySQLite::cSQLiteStatement::BindBlob ( SQL_COLUMN_t  i,
const void *  value,
int  nSize 
)
inline

◆ BindNull()

HRESULT GraySQLite::cSQLiteStatement::BindNull ( SQL_COLUMN_t  i)
inline

◆ CloseStatement()

HRESULT GraySQLite::cSQLiteStatement::CloseStatement ( bool  bDrop)
overridevirtual

ISQLStatement Alternate way to free m_pStmt.

◆ DoBind() [1/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i)
protected

◆ DoBind() [2/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
const cString value 
)
protected

◆ DoBind() [3/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
const GChar_t pszValue,
StrLen_t  iLen = -1 
)
protected

◆ DoBind() [4/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
const void *  pValue,
size_t  nSize 
)
protected

◆ DoBind() [5/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
double  value 
)
protected

◆ DoBind() [6/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
int  value 
)
protected

◆ DoBind() [7/7]

HRESULT GraySQLite::cSQLiteStatement::DoBind ( SQL_COLUMN_t  i,
sqlite3_int64  value 
)
protected

◆ ExecCancel()

void GraySQLite::cSQLiteStatement::ExecCancel ( )
overridevirtual

ISQLStatement

◆ ExecuteAndFetch()

HRESULT GraySQLite::cSQLiteStatement::ExecuteAndFetch ( bool  bResultsExpected)
overridevirtual

ISQLStatement Prep Work was already done in cSQLiteStatement construct.

◆ FetchNext()

HRESULT GraySQLite::cSQLiteStatement::FetchNext ( bool  bMore = false)
overridevirtual

ISQLStatement Fetch (more) results (if appropriate).

◆ FillException()

virtual HRESULT GraySQLite::cSQLiteStatement::FillException ( cSQLException pException = nullptr)
inlineoverridevirtual

Reimplemented from GraySQLite::cSQLiteBase.

◆ GetColumn()

cSQLiteColumn GraySQLite::cSQLiteStatement::GetColumn ( cSQLiteCol_t  iColumn = 0) const

ASSUME sqlite3_step has been called. k_SQL_COL_FIRST

◆ GetColumnVar()

bool GraySQLite::cSQLiteStatement::GetColumnVar ( SQL_COLUMN_t  iColumn,
cSQLColumnInfo pColInfo,
OUT cVariant vValRet 
)
overridevirtual

ISQLStatement

◆ IUNKNOWN_DISAMBIG()

GraySQLite::cSQLiteStatement::IUNKNOWN_DISAMBIG ( SUPER_t  )

◆ ReadColumnCount()

ITERATE_t GraySQLite::cSQLiteStatement::ReadColumnCount ( )
overridevirtual

ISQLStatement Get number of columns.

◆ ReadColumnInfo()

bool GraySQLite::cSQLiteStatement::ReadColumnInfo ( SQL_COLUMN_t  iColumn,
OUT cSQLColumnInfo info 
)
overridevirtual

ISQLStatement Get meta data for column.

◆ ResetBind()

void GraySQLite::cSQLiteStatement::ResetBind ( )
protected

◆ ResetBindCheck()

void GraySQLite::cSQLiteStatement::ResetBindCheck ( )
inlineprotected

Friends And Related Function Documentation

◆ cSQLiteDb

friend class cSQLiteDb
friend

Member Data Documentation

◆ m_bNeedResetBind

bool GraySQLite::cSQLiteStatement::m_bNeedResetBind
protected

sqlite3_step has been called. need to call sqlite3_reset to clear binds to reuse this statement.

◆ m_pStmt

::sqlite3_stmt* GraySQLite::cSQLiteStatement::m_pStmt
protected

Statement in action.


The documentation for this class was generated from the following files: