Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSQLBase Class Referenceabstract

#include <cSQLBase.h>

Inheritance diagram for GrayLib::cSQLBase:
Gray::CObject Gray::cNonCopyable GrayLib::cSQLDatabase GrayLib::cSQLDriver GrayLib::cSQLStatement GrayLib::cODBCDriver GraySQLite::cSQLiteDriver GrayLib::cSQLStatementQ GrayLib::cScriptSourceSQLStatement

Public Member Functions

virtual ~cSQLBase ()
 
HRESULT FillException (cExceptionHolder &exh, cStringA sCommand, const cDebugSourceLine &src) const
 
HRESULT ReturnError1 (cExceptionHolder &exh) const
 
HRESULT ReturnError2 (cStringA sCommand, const cDebugSourceLine &src) const
 
bool isISQLValid () const
 The SQL handle. More...
 
virtual cSQLDriverget_SQLDriver () const =0
 What driver ultimately owns this? More...
 
virtual cSQLBaseget_SQLParent () const =0
 
ITERATE_t get_ChildHandleCount () const noexcept
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 

Static Public Member Functions

static const FILECHAR_t *GRAYCALL RemoveDriverIdentification (const FILECHAR_t *pszError)
 

Public Attributes

bool m_bLogOnError
 I want to log message if error. More...
 

Protected Member Functions

bool AttachISQL (ISQLBase *pSQL)
 
void FreeISQL ()
 
bool FreeISQLTested ()
 
 cSQLBase ()
 
- Protected Member Functions inherited from Gray::cNonCopyable
 cNonCopyable () noexcept
 Force the use of Factory creation via protected constructor. More...
 
 ~cNonCopyable () noexcept
 

Protected Attributes

cIUnkPtr< ISQLBasem_pISQL
 ISQLBase to some SQL implementation object -> a Driver/environment, connection or recordset/statement. More...
 

Detailed Description

Base class for DB objects that have a ISQLBase/ISQLDriver API. Base for things like: cSQLDriver, cSQLDatabase, cSQLStatement. similar to http://www.sqlapi.com/ ?

Constructor & Destructor Documentation

◆ cSQLBase()

GrayLib::cSQLBase::cSQLBase ( )
protected

◆ ~cSQLBase()

GrayLib::cSQLBase::~cSQLBase ( )
virtual

Member Function Documentation

◆ AttachISQL()

bool GrayLib::cSQLBase::AttachISQL ( ISQLBase pSQL)
protected

Tell my parent it has a new child.

◆ FillException()

HRESULT GrayLib::cSQLBase::FillException ( cExceptionHolder exh,
cStringA  sCommand,
const cDebugSourceLine src 
) const

If there was an error, fill a record describing it.

Returns
a reasonable HRESULT

◆ FreeISQL()

void GrayLib::cSQLBase::FreeISQL ( )
protected

The ISQLBase is now Free. Detach from my parent. so my parent can free itself later.

◆ FreeISQLTested()

bool GrayLib::cSQLBase::FreeISQLTested ( )
protected

I cant free myself until all child/derived ISQLBase are free first !

◆ get_ChildHandleCount()

ITERATE_t GrayLib::cSQLBase::get_ChildHandleCount ( ) const
inlinenoexcept

< Children with open ISQL interfaces.

◆ get_SQLDriver()

virtual cSQLDriver* GrayLib::cSQLBase::get_SQLDriver ( ) const
pure virtual

What driver ultimately owns this?

Implemented in GrayLib::cSQLDriver, GrayLib::cSQLStatement, and GrayLib::cSQLDatabase.

◆ get_SQLParent()

virtual cSQLBase* GrayLib::cSQLBase::get_SQLParent ( ) const
pure virtual

◆ isISQLValid()

bool GrayLib::cSQLBase::isISQLValid ( ) const

The SQL handle.

◆ RemoveDriverIdentification()

const FILECHAR_t *GRAYCALL GrayLib::cSQLBase::RemoveDriverIdentification ( const FILECHAR_t pszError)
static

◆ ReturnError1()

HRESULT GrayLib::cSQLBase::ReturnError1 ( cExceptionHolder exh) const

◆ ReturnError2()

HRESULT GrayLib::cSQLBase::ReturnError2 ( cStringA  sCommand,
const cDebugSourceLine src 
) const

Member Data Documentation

◆ m_bLogOnError

bool GrayLib::cSQLBase::m_bLogOnError

I want to log message if error.

◆ m_pISQL

cIUnkPtr<ISQLBase> GrayLib::cSQLBase::m_pISQL
protected

ISQLBase to some SQL implementation object -> a Driver/environment, connection or recordset/statement.


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