QxOrm  1.2.9
C++ Object Relational Mapping library

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::QxSqlQueryqxQuery ()
const qx::QxSqlQueryqxQuery () const
qx::IxSqlQueryBuilderbuilder ()
const qx::IxSqlQueryBuilderbuilder () const
qx::IxDataMemberXgetDataMemberX () const
long getDataCount () const
qx::IxDataMembergetDataId () const
qx::IxDataMembernextData (long &l) const
QString sql () const
qx::QxSqlRelationLinkedgetSqlRelationLinked () const
bool getCartesianProduct () const
QStringList getSqlColumns () const
void setSqlColumns (const QStringList &lst)
IxSqlGeneratorgetSqlGenerator () const
void addInvalidValues (const qx::QxInvalidValueX &lst)
bool getAddAutoIncrementIdToUpdateQuery () const
bool isReadOnly () const
QSqlError errFailed ()
QSqlError errEmpty ()
QSqlError errNoData ()
QSqlError errInvalidId ()
QSqlError errInvalidRelation ()
QSqlError errReadOnly ()
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 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::IxDataMemberXm_pDataMemberX
 Collection of data member.
qx::IxDataMemberm_pDataId
 Data member id.
qx::QxSqlQuery m_qxQuery
 Query sql with place-holder.
IxSqlGeneratorm_pSqlGenerator
 SQL generator to build SQL query specific for each database.
qx::QxInvalidValueX m_lstInvalidValues
 List of invalid values using validator engine.
qx::QxSqlRelationLinked_ptr m_pSqlRelationLinked
 List of relation linked to build a hierarchy of relationships.

Detailed Description

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

Definition at line 83 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
QSqlError qx::dao::detail::IxDao_Helper::errReadOnly ( )
bool qx::dao::detail::IxDao_Helper::exec ( )
bool qx::dao::detail::IxDao_Helper::getAddAutoIncrementIdToUpdateQuery ( ) const
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
qx::QxSqlRelationLinked* qx::dao::detail::IxDao_Helper::getSqlRelationLinked ( ) 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::isReadOnly ( ) const
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 162 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 166 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 173 of file IxDao_Helper.h.


Member Data Documentation

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

Definition at line 98 of file IxDao_Helper.h.

Display message and assert in debug mode.

Definition at line 95 of file IxDao_Helper.h.

Trace sql query.

Definition at line 96 of file IxDao_Helper.h.

Trace sql record.

Definition at line 97 of file IxDao_Helper.h.

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

Definition at line 94 of file IxDao_Helper.h.

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

Definition at line 99 of file IxDao_Helper.h.

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

Definition at line 92 of file IxDao_Helper.h.

Connection to database to execute query.

Definition at line 89 of file IxDao_Helper.h.

Error executing query.

Definition at line 91 of file IxDao_Helper.h.

Data member collection count.

Definition at line 93 of file IxDao_Helper.h.

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

Definition at line 100 of file IxDao_Helper.h.

List of invalid values using validator engine.

Definition at line 107 of file IxDao_Helper.h.

Data member id.

Definition at line 104 of file IxDao_Helper.h.

Collection of data member.

Definition at line 103 of file IxDao_Helper.h.

Sql query builder.

Definition at line 102 of file IxDao_Helper.h.

SQL generator to build SQL query specific for each database.

Definition at line 106 of file IxDao_Helper.h.

List of relation linked to build a hierarchy of relationships.

Definition at line 108 of file IxDao_Helper.h.

Query to execute.

Definition at line 90 of file IxDao_Helper.h.

Query sql with place-holder.

Definition at line 105 of file IxDao_Helper.h.

Time (in ms) to execute query.

Definition at line 88 of file IxDao_Helper.h.


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