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

#include <cSQLMgr.h>

Inheritance diagram for GrayLib::cSQLDriver:
GrayLib::cSQLBase Gray::cRefBase Gray::CObject Gray::cNonCopyable IUnknown GrayLib::cODBCDriver GraySQLite::cSQLiteDriver

Public Member Functions

 cSQLDriver (const char *pszName)
 
virtual ~cSQLDriver ()
 
const char * get_Name () const noexcept
 
virtual cSQLDriverget_SQLDriver () const override
 What driver ultimately owns this? More...
 
virtual cSQLBaseget_SQLParent () const override
 
virtual int TestConnectionStringMatch (const cSQLConnectionString &rConnectionString)
 
virtual bool AllocISQLDriver ()=0
 
ISQLDriverget_ISQLDriver () const
 
bool FreeISQLDriver ()
 
- Public Member Functions inherited from GrayLib::cSQLBase
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...
 
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)
 
- 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 ()
 

Public Attributes

const char *const m_pszName
 Unique Name for Provider in ConnectionString. More...
 
ITERATE_t m_iTotalHandles
 Total handles open. More...
 
ITERATE_t m_iTotalConnected
 Total cSQLDatabase open connects. More...
 
- Public Attributes inherited from GrayLib::cSQLBase
bool m_bLogOnError
 I want to log message if error. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GrayLib::cSQLBase
static const FILECHAR_t *GRAYCALL RemoveDriverIdentification (const FILECHAR_t *pszError)
 
- Protected Member Functions inherited from GrayLib::cSQLBase
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 inherited from GrayLib::cSQLBase
cIUnkPtr< ISQLBasem_pISQL
 ISQLBase to some SQL implementation object -> a Driver/environment, connection or recordset/statement. More...
 

Detailed Description

Abstract base class for SQL drivers/providers. Need only one of these per type per process. e.g. ODBC 3.0. AKA "Provider" in connection string.

Constructor & Destructor Documentation

◆ cSQLDriver()

GrayLib::cSQLDriver::cSQLDriver ( const char *  pszName)

◆ ~cSQLDriver()

GrayLib::cSQLDriver::~cSQLDriver ( )
virtual

Member Function Documentation

◆ AllocISQLDriver()

virtual bool GrayLib::cSQLDriver::AllocISQLDriver ( )
pure virtual

◆ FreeISQLDriver()

bool GrayLib::cSQLDriver::FreeISQLDriver ( )

Free ISQLDriver

◆ get_ISQLDriver()

ISQLDriver * GrayLib::cSQLDriver::get_ISQLDriver ( ) const

ASSUME AllocISQLDriver was already called and was a success.

◆ get_Name()

const char* GrayLib::cSQLDriver::get_Name ( ) const
inlinenoexcept

◆ get_SQLDriver()

virtual cSQLDriver* GrayLib::cSQLDriver::get_SQLDriver ( ) const
inlineoverridevirtual

What driver ultimately owns this?

Implements GrayLib::cSQLBase.

◆ get_SQLParent()

virtual cSQLBase* GrayLib::cSQLDriver::get_SQLParent ( ) const
inlineoverridevirtual

Implements GrayLib::cSQLBase.

◆ TestConnectionStringMatch()

int GrayLib::cSQLDriver::TestConnectionStringMatch ( const cSQLConnectionString rConnectionString)
virtual

Is this the correct driver for the connection string? Test if m_pszName is in sConnectionString;

Returns
100 = absolutely sure it is right.

Reimplemented in GraySQLite::cSQLiteDriver, and GrayLib::cODBCDriver.

Member Data Documentation

◆ m_iTotalConnected

ITERATE_t GrayLib::cSQLDriver::m_iTotalConnected

Total cSQLDatabase open connects.

◆ m_iTotalHandles

ITERATE_t GrayLib::cSQLDriver::m_iTotalHandles

Total handles open.

◆ m_pszName

const char* const GrayLib::cSQLDriver::m_pszName

Unique Name for Provider in ConnectionString.


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