| QxOrm 1.2.3 C++ Object Relational Mapping library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
qx::dao::detail::IxDao_Helper Class Reference
QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)

qx::dao::detail::IxDao_Helper : helper class to communicate with database More...

`#include <IxDao_Helper.h>`

List of all members.

## Public Member Functions
bool | isValid () const
bool | hasFeature (QSqlDriver::DriverFeature ft) const
QSqlDatabase & | database ()
const QSqlDatabase & | database () const
QSqlQuery & | query ()
const QSqlQuery & | query () const
QSqlError & | error ()
const QSqlError & | error () const
qx::QxSqlQuery & | qxQuery ()
const qx::QxSqlQuery & | qxQuery () const
qx::IxSqlQueryBuilder & | builder ()
const qx::IxSqlQueryBuilder & | builder () const
qx::IxDataMemberX * | getDataMemberX () const
long | getDataCount () const
qx::IxDataMember * | getDataId () const
qx::IxDataMember * | nextData (long &l) const
QString | sql () const
type_lst_relation * | getSqlRelationX () const
bool | getCartesianProduct () const
QStringList | getSqlColumns () const
void | setSqlColumns (const QStringList &lst)
IxSqlGenerator * | getSqlGenerator () const
void | addInvalidValues (const qx::QxInvalidValueX &lst)
QSqlError | errFailed ()
QSqlError | errEmpty ()
QSqlError | errNoData ()
QSqlError | errInvalidId ()
QSqlError | errInvalidRelation ()
bool | transaction ()
bool | nextRecord ()
void | updateError (const QSqlError &error)
void | quiet ()
bool | exec ()
bool | updateSqlRelationX (const QStringList &relation)
void | dumpRecord () const
void | addQuery (const qx::QxSqlQuery &query, bool bResolve)
template<class U >
bool | isValidPrimaryKey (const U &u)
template<class U >
void | updateLastInsertId (U &u)
template<class U >
bool | validateInstance (U &u)
## Protected Types
typedef qx::QxCollection < QString, qx::IxSqlRelation * > | type_lst_relation
typedef boost::scoped_ptr < type_lst_relation > | type_lst_relation_ptr
## Protected Member Functions
| IxDao_Helper ()
virtual | ~IxDao_Helper ()
virtual void | updateQueryBuilder ()
QSqlError | updateError (const QString &sError)
void | init (QSqlDatabase *pDatabase, const QString &sContext)
void | terminate ()
## Protected Attributes
QTime | m_time
| Time (in ms) to execute query.
QSqlDatabase | m_database
| Connection to database to execute query.
QSqlQuery | m_query
| Query to execute.
QSqlError | m_error
| Error executing query.
QString | m_context
| Description of context : fetch, insert, update, delete, etc...
long | m_lDataCount
| Data member collection count.
bool | m_bTransaction
| Transaction in progress : commit if valid, rollback if error.
bool | m_bQuiet
| Display message and assert in debug mode.
bool | m_bTraceQuery
| Trace sql query.
bool | m_bTraceRecord
| Trace sql record.
bool | m_bCartesianProduct
| Recordset can return cartesian product => same id in multiple records.
bool | m_bValidatorThrowable
| An exception of type qx::validator_error is thrown when invalid values are detected inserting or updating an element into database.
QStringList | m_lstColumns
| List of columns to execute sql query (if empty => all columns)
qx::IxSqlQueryBuilder_ptr | m_pQueryBuilder
| Sql query builder.
qx::IxDataMemberX * | m_pDataMemberX
| Collection of data member.
qx::IxDataMember * | m_pDataId
| Data member id.
qx::QxSqlQuery | m_qxQuery
| Query sql with place-holder.
IxSqlGenerator * | m_pSqlGenerator
| SQL generator to build SQL query specific for each database.
qx::QxInvalidValueX | m_lstInvalidValues
| List of invalid values using validator engine.
type_lst_relation_ptr | m_pSqlRelationX

## Detailed Description

qx::dao::detail::IxDao_Helper : helper class to communicate with database

Definition at line 78 of file IxDao_Helper.h.

## Member Typedef Documentation

typedef qx::QxCollection<QString, qx::IxSqlRelation *> qx::dao::detail::IxDao_Helper::type_lst_relation`[protected]`

Definition at line 104 of file IxDao_Helper.h.

typedef boost::scoped_ptr< type_lst_relation > qx::dao::detail::IxDao_Helper::type_lst_relation_ptr`[protected]`

Definition at line 105 of file IxDao_Helper.h.

## Constructor & Destructor Documentation

qx::dao::detail::IxDao_Helper::IxDao_Helper | ( |  | ) | `[protected]`

virtual qx::dao::detail::IxDao_Helper::~IxDao_Helper | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

void qx::dao::detail::IxDao_Helper::addInvalidValues | ( | const qx::QxInvalidValueX & | lst | ) |

void qx::dao::detail::IxDao_Helper::addQuery | ( | const qx::QxSqlQuery & | query,
|  | bool | bResolve
| ) |  |

qx::IxSqlQueryBuilder& qx::dao::detail::IxDao_Helper::builder | ( |  | ) |

const qx::IxSqlQueryBuilder& qx::dao::detail::IxDao_Helper::builder | ( |  | ) | const

QSqlDatabase& qx::dao::detail::IxDao_Helper::database | ( |  | ) |

const QSqlDatabase& qx::dao::detail::IxDao_Helper::database | ( |  | ) | const

void qx::dao::detail::IxDao_Helper::dumpRecord | ( |  | ) | const

QSqlError qx::dao::detail::IxDao_Helper::errEmpty | ( |  | ) |

QSqlError qx::dao::detail::IxDao_Helper::errFailed | ( |  | ) |

QSqlError qx::dao::detail::IxDao_Helper::errInvalidId | ( |  | ) |

QSqlError qx::dao::detail::IxDao_Helper::errInvalidRelation | ( |  | ) |

QSqlError qx::dao::detail::IxDao_Helper::errNoData | ( |  | ) |

QSqlError& qx::dao::detail::IxDao_Helper::error | ( |  | ) |

const QSqlError& qx::dao::detail::IxDao_Helper::error | ( |  | ) | const

bool qx::dao::detail::IxDao_Helper::exec | ( |  | ) |

bool qx::dao::detail::IxDao_Helper::getCartesianProduct | ( |  | ) | const

long qx::dao::detail::IxDao_Helper::getDataCount | ( |  | ) | const

qx::IxDataMember* qx::dao::detail::IxDao_Helper::getDataId | ( |  | ) | const

qx::IxDataMemberX* qx::dao::detail::IxDao_Helper::getDataMemberX | ( |  | ) | const

QStringList qx::dao::detail::IxDao_Helper::getSqlColumns | ( |  | ) | const

IxSqlGenerator* qx::dao::detail::IxDao_Helper::getSqlGenerator | ( |  | ) | const

type_lst_relation* qx::dao::detail::IxDao_Helper::getSqlRelationX | ( |  | ) | const

bool qx::dao::detail::IxDao_Helper::hasFeature | ( | QSqlDriver::DriverFeature | ft | ) | const

void qx::dao::detail::IxDao_Helper::init | ( | QSqlDatabase * | pDatabase,
|  | const QString & | sContext
| ) |  | `[protected]`

bool qx::dao::detail::IxDao_Helper::isValid | ( |  | ) | const

template<class U >

bool qx::dao::detail::IxDao_Helper::isValidPrimaryKey | ( | const U & | u | ) | `[inline]`

Definition at line 157 of file IxDao_Helper.h.

qx::IxDataMember* qx::dao::detail::IxDao_Helper::nextData | ( | long & | l | ) | const

bool qx::dao::detail::IxDao_Helper::nextRecord | ( |  | ) |

QSqlQuery& qx::dao::detail::IxDao_Helper::query | ( |  | ) |

const QSqlQuery& qx::dao::detail::IxDao_Helper::query | ( |  | ) | const

void qx::dao::detail::IxDao_Helper::quiet | ( |  | ) |

qx::QxSqlQuery& qx::dao::detail::IxDao_Helper::qxQuery | ( |  | ) |

const qx::QxSqlQuery& qx::dao::detail::IxDao_Helper::qxQuery | ( |  | ) | const

void qx::dao::detail::IxDao_Helper::setSqlColumns | ( | const QStringList & | lst | ) |

QString qx::dao::detail::IxDao_Helper::sql | ( |  | ) | const

void qx::dao::detail::IxDao_Helper::terminate | ( |  | ) | `[protected]`

bool qx::dao::detail::IxDao_Helper::transaction | ( |  | ) |

void qx::dao::detail::IxDao_Helper::updateError | ( | const QSqlError & | error | ) |

QSqlError qx::dao::detail::IxDao_Helper::updateError | ( | const QString & | sError | ) | `[protected]`

template<class U >

void qx::dao::detail::IxDao_Helper::updateLastInsertId | ( | U & | u | ) | `[inline]`

Definition at line 161 of file IxDao_Helper.h.

virtual void qx::dao::detail::IxDao_Helper::updateQueryBuilder | ( |  | ) | `[protected, virtual]`

bool qx::dao::detail::IxDao_Helper::updateSqlRelationX | ( | const QStringList & | relation | ) |

template<class U >

bool qx::dao::detail::IxDao_Helper::validateInstance | ( | U & | u | ) | `[inline]`

Definition at line 168 of file IxDao_Helper.h.

## Member Data Documentation

bool qx::dao::detail::IxDao_Helper::m_bCartesianProduct`[protected]`

Recordset can return cartesian product => same id in multiple records.

Definition at line 93 of file IxDao_Helper.h.

bool qx::dao::detail::IxDao_Helper::m_bQuiet`[protected]`

Display message and assert in debug mode.

Definition at line 90 of file IxDao_Helper.h.

bool qx::dao::detail::IxDao_Helper::m_bTraceQuery`[protected]`

Trace sql query.

Definition at line 91 of file IxDao_Helper.h.

bool qx::dao::detail::IxDao_Helper::m_bTraceRecord`[protected]`

Trace sql record.

Definition at line 92 of file IxDao_Helper.h.

bool qx::dao::detail::IxDao_Helper::m_bTransaction`[protected]`

Transaction in progress : commit if valid, rollback if error.

Definition at line 89 of file IxDao_Helper.h.

bool qx::dao::detail::IxDao_Helper::m_bValidatorThrowable`[protected]`

An exception of type qx::validator_error is thrown when invalid values are detected inserting or updating an element into database.

Definition at line 94 of file IxDao_Helper.h.

QString qx::dao::detail::IxDao_Helper::m_context`[protected]`

Description of context : fetch, insert, update, delete, etc...

Definition at line 87 of file IxDao_Helper.h.

QSqlDatabase qx::dao::detail::IxDao_Helper::m_database`[protected]`

Connection to database to execute query.

Definition at line 84 of file IxDao_Helper.h.

QSqlError qx::dao::detail::IxDao_Helper::m_error`[protected]`

Error executing query.

Definition at line 86 of file IxDao_Helper.h.

long qx::dao::detail::IxDao_Helper::m_lDataCount`[protected]`

Data member collection count.

Definition at line 88 of file IxDao_Helper.h.

QStringList qx::dao::detail::IxDao_Helper::m_lstColumns`[protected]`

List of columns to execute sql query (if empty => all columns)

Definition at line 95 of file IxDao_Helper.h.

qx::QxInvalidValueX qx::dao::detail::IxDao_Helper::m_lstInvalidValues`[protected]`

List of invalid values using validator engine.

Definition at line 102 of file IxDao_Helper.h.

qx::IxDataMember* qx::dao::detail::IxDao_Helper::m_pDataId`[protected]`

Data member id.

Definition at line 99 of file IxDao_Helper.h.

qx::IxDataMemberX* qx::dao::detail::IxDao_Helper::m_pDataMemberX`[protected]`

Collection of data member.

Definition at line 98 of file IxDao_Helper.h.

qx::IxSqlQueryBuilder_ptr qx::dao::detail::IxDao_Helper::m_pQueryBuilder`[protected]`

Sql query builder.

Definition at line 97 of file IxDao_Helper.h.

IxSqlGenerator* qx::dao::detail::IxDao_Helper::m_pSqlGenerator`[protected]`

SQL generator to build SQL query specific for each database.

Definition at line 101 of file IxDao_Helper.h.

type_lst_relation_ptr qx::dao::detail::IxDao_Helper::m_pSqlRelationX`[protected]`

Definition at line 106 of file IxDao_Helper.h.

QSqlQuery qx::dao::detail::IxDao_Helper::m_query`[protected]`

Query to execute.

Definition at line 85 of file IxDao_Helper.h.

qx::QxSqlQuery qx::dao::detail::IxDao_Helper::m_qxQuery`[protected]`

Query sql with place-holder.

Definition at line 100 of file IxDao_Helper.h.

QTime qx::dao::detail::IxDao_Helper::m_time`[protected]`

Time (in ms) to execute query.

Definition at line 83 of file IxDao_Helper.h.

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

- D:/Dvlp/_Perso/QxOrm/include/QxDao/IxDao_Helper.h