![]() |
Offers a database access subsystem. More...
Classes | |
class | DB |
Data subsystem initialization. More... | |
struct | DBMetadataField |
Describes each field within a database operation. More... | |
class | CycleBase |
A Cycle is a special type of class that permits to execute a method for each one of the elements returned on a query operation, maintaining a state that will survive each one of these executions. More... | |
class | NullCycle |
Particular Cycle type doing nothing. More... | |
class | QueryUniqueCycle |
Particular Cycle for usage when a query will only return one row. More... | |
class | DBResultSet |
The result of a query operation. More... | |
class | DBStatement |
Defines the operation that will be performed by the database. More... | |
class | DBEnvironment |
This is, basically, a database session. More... | |
class | DBException |
Extension to describe DBBase exceptions. More... | |
class | DBDrvLib |
class | DBEnvironmentQueue |
Offers a queue-like storage for a DBEnvironment session pools. More... | |
class | DBStatementCatalog |
Offers a database statement catalog that will be used by the database infrastructure to manage reusable SQL statement definitions. More... | |
class | QueryRunner |
The general statement executor or (runner). More... | |
Typedefs | |
typedef Array< DBMetadataField > | DBMetadata |
As an array of DBMetadataField elements, it will keep the information related with each database operation for internal processing. | |
typedef function< bool(DBResultSet *pResultSetPtr, bool pIsFirst, bool pIsLast)> | ExecuteFunctionType |
Prototype function to be used when it is not necessary to store states (for that use the Cycle classes. | |
typedef string(* | WhatMethod )(string &pMessageRef, exception *pExceptPtr) |
typedef map< string, DBDrvLib * > | DBDrvLibMap |
Basic DBDrvLib STL dictionary. | |
typedef DBDrvLibMap::iterator | DBDrvLibMapIterator |
A DBDrvLib iterator. | |
typedef list< DBEnvironment * > | DBEnvironmentList |
typedef DBEnvironmentList::iterator | DBEnvironmentListIterator |
typedef DBEnvironment *(* | environmentCreatorType )() |
typedef map< string, DBEnvironmentQueue * > | DBEnvironmentQueueMap |
typedef DBEnvironmentQueueMap::iterator | DBEnvironmentQueueMapIterator |
typedef list< DBType > | DBTypeList |
datatype list to use as reference | |
typedef pair< DBType, string > | DBParameter |
parameter type and a string value | |
typedef vector< DBParameter > | DBParameters |
parameter vector to pass to methods | |
Enumerations | |
enum | DBType { DBT_Null = 0, DBT_Number = 1, DBT_String = 2, DBT_Float = 3, DBT_Binary = 4 } |
Data types can be used as parameters when running SQL operations. More... | |
Functions | |
string & | BaseWhatMethod (string &pMessageRef, exception *pExceptionPtr) |
Offers a database access subsystem.
This subsystem includes the following characteristics:
The database sentences are pre-stored and they are prepared without direct string manipulation. This provides flexibility because each particular statement is separated from the compiled program, and security because no string concatenation is performed so, it limits the possibility to have SQL injection problems.
The subsystem/engine loads all available drivers and perform all the database connections are stored in the corresponding pool configurations. Any application using this engine can use any of the available resources for the required purpose.
The QueryRunner acquires and releases sessions from the session pool automatically and even have the capacity to make a "one-time" connection embedded engine as SQLite to behave as a multi-user concurrent engine.
Each statement is stored in an independent .sql text file. If the file has the prefix "SYNC-", the engine will create a parameters file with enough data for an external application to read it and to send to another engine located in another computer. As these engines can manage different types of dbms, it is possible to define a synchronization between normally incompatible database systems. For example, a MySQL dbms could synchronize to a SQLite embedded system for backup purposes, so will reduce the cost and complexity for a complete synchronization system based on one vendor offering.
The pool configuration is defined with one file
This file is enough to control many threads accessing the database in a concurrent/safe way.
typedef map<string,DBDrvLib*> HSEPData::DBDrvLibMap |
Basic DBDrvLib STL dictionary.
In version 0.2 this will be modified to match the HSEP base driver behavior.
Definition at line 119 of file DBDrvLib.h.
typedef DBDrvLibMap::iterator HSEPData::DBDrvLibMapIterator |
A DBDrvLib iterator.
In version 0.2 this will be modified to match the HSEP base driver behavior and the HSEP etiquette definitions.
Definition at line 127 of file DBDrvLib.h.
typedef list<DBEnvironment*> HSEPData::DBEnvironmentList |
Definition at line 35 of file DBEnvironmentQueue.h.
typedef DBEnvironmentList::iterator HSEPData::DBEnvironmentListIterator |
Definition at line 36 of file DBEnvironmentQueue.h.
typedef map<string,DBEnvironmentQueue*> HSEPData::DBEnvironmentQueueMap |
Definition at line 76 of file DBEnvironmentQueue.h.
typedef DBEnvironmentQueueMap::iterator HSEPData::DBEnvironmentQueueMapIterator |
Definition at line 77 of file DBEnvironmentQueue.h.
typedef Array<DBMetadataField> HSEPData::DBMetadata |
As an array of DBMetadataField elements, it will keep the information related with each database operation for internal processing.
typedef pair<DBType,string> HSEPData::DBParameter |
typedef vector<DBParameter> HSEPData::DBParameters |
typedef list<DBType> HSEPData::DBTypeList |
typedef DBEnvironment*(* HSEPData::environmentCreatorType)() |
Definition at line 37 of file DBEnvironmentQueue.h.
typedef function<bool (DBResultSet* pResultSetPtr, bool pIsFirst, bool pIsLast)> HSEPData::ExecuteFunctionType |
typedef string(* HSEPData::WhatMethod)(string &pMessageRef, exception *pExceptPtr) |
enum HSEPData::DBType |
string& HSEPData::BaseWhatMethod | ( | string & | pMessageRef, |
exception * | pExceptionPtr | ||
) |
Definition at line 28 of file DBBase.cpp.
Referenced by HSEPData::DBException::DBException().