![]() |
QxOrm
1.3.2
C++ Object Relational Mapping library
|
qx::dao::detail::IxDao_Helper : helper class to communicate with database More...
#include <IxDao_Helper.h>
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 |
qx::QxSqlRelationLinked * | getSqlRelationLinked () const |
bool | getCartesianProduct () const |
QStringList | getSqlColumns () const |
void | setSqlColumns (const QStringList &lst) |
IxSqlGenerator * | getSqlGenerator () 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::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. | |
qx::QxSqlRelationLinked_ptr | m_pSqlRelationLinked |
List of relation linked to build a hierarchy of relationships. |
qx::dao::detail::IxDao_Helper : helper class to communicate with database
Definition at line 83 of file IxDao_Helper.h.
qx::dao::detail::IxDao_Helper::IxDao_Helper | ( | ) | [protected] |
virtual qx::dao::detail::IxDao_Helper::~IxDao_Helper | ( | ) | [protected, virtual] |
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 |
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] |
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 | ) |
bool qx::dao::detail::IxDao_Helper::validateInstance | ( | U & | u | ) | [inline] |
Definition at line 173 of file IxDao_Helper.h.
bool qx::dao::detail::IxDao_Helper::m_bCartesianProduct [protected] |
Recordset can return cartesian product => same id in multiple records.
Definition at line 98 of file IxDao_Helper.h.
bool qx::dao::detail::IxDao_Helper::m_bQuiet [protected] |
Display message and assert in debug mode.
Definition at line 95 of file IxDao_Helper.h.
bool qx::dao::detail::IxDao_Helper::m_bTraceQuery [protected] |
Trace sql query.
Definition at line 96 of file IxDao_Helper.h.
bool qx::dao::detail::IxDao_Helper::m_bTraceRecord [protected] |
Trace sql record.
Definition at line 97 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 94 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 99 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 92 of file IxDao_Helper.h.
QSqlDatabase qx::dao::detail::IxDao_Helper::m_database [protected] |
Connection to database to execute query.
Definition at line 89 of file IxDao_Helper.h.
QSqlError qx::dao::detail::IxDao_Helper::m_error [protected] |
Error executing query.
Definition at line 91 of file IxDao_Helper.h.
long qx::dao::detail::IxDao_Helper::m_lDataCount [protected] |
Data member collection count.
Definition at line 93 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 100 of file IxDao_Helper.h.
List of invalid values using validator engine.
Definition at line 107 of file IxDao_Helper.h.
qx::IxDataMember* qx::dao::detail::IxDao_Helper::m_pDataId [protected] |
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.
QSqlQuery qx::dao::detail::IxDao_Helper::m_query [protected] |
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.
QTime qx::dao::detail::IxDao_Helper::m_time [protected] |
Time (in ms) to execute query.
Definition at line 88 of file IxDao_Helper.h.