| QxOrm 1.1.9 C++ Object Relational Mapping library

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

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

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

qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database More...

`#include <IxSqlQueryBuilder.h>`

Inheritance diagram for qx::IxSqlQueryBuilder:

List of all members.

## Public Types
typedef QPair< QString, QString > | type_id
typedef QHash< type_id, void * > | type_ptr_by_id
typedef boost::shared_ptr < type_ptr_by_id > | type_ptr_by_id_ptr
typedef QList< type_ptr_by_id_ptr > | type_lst_ptr_by_id
typedef boost::shared_ptr < type_lst_ptr_by_id > | type_lst_ptr_by_id_ptr
## Public Member Functions
| IxSqlQueryBuilder ()
| IxSqlQueryBuilder (const QString &sql)
virtual | ~IxSqlQueryBuilder ()=0
QxCollection< QString, IxDataMember * > * | getLstDataMember () const
IxSqlRelationX * | getLstRelation () const
void | setSqlQuery (const QString &sql)
void | setHashRelation (const QString &s)
void | setCartesianProduct (bool b)
QString | getSqlQuery () const
QString | getHashRelation () const
QString | table () const
QxSoftDelete | getSoftDelete () const
bool | getCartesianProduct () const
long | getDataCount () const
long | getRelationCount () const
IxDataMember * | getDataId () const
IxDataMember * | nextData (long &l) const
IxSqlRelation * | nextRelation (long &l) const
void | displaySqlQuery (int time_ms=-1) const
bool | insertIdX (long lIndex, const QVariant &idOwner, const QVariant &idData, void *ptr)
void * | existIdX (long lIndex, const QVariant &idOwner, const QVariant &idData)
virtual void | init ()=0
virtual IxDataMemberX * | getDataMemberX () const =0
virtual IxSqlQueryBuilder & | count ()=0
virtual IxSqlQueryBuilder & | exist ()=0
virtual IxSqlQueryBuilder & | fetchAll ()=0
virtual IxSqlQueryBuilder & | fetchById ()=0
virtual IxSqlQueryBuilder & | insert ()=0
virtual IxSqlQueryBuilder & | update ()=0
virtual IxSqlQueryBuilder & | deleteAll ()=0
virtual IxSqlQueryBuilder & | softDeleteAll ()=0
virtual IxSqlQueryBuilder & | deleteById ()=0
virtual IxSqlQueryBuilder & | softDeleteById ()=0
virtual IxSqlQueryBuilder & | createTable ()=0
virtual IxSqlQueryBuilder & | fetchAll (const QStringList &columns)=0
virtual IxSqlQueryBuilder & | fetchById (const QStringList &columns)=0
virtual IxSqlQueryBuilder & | update (const QStringList &columns)=0
virtual IxSqlQueryBuilder & | fetchAll_WithRelation (IxSqlRelationX *pRelationX)=0
virtual IxSqlQueryBuilder & | fetchById_WithRelation (IxSqlRelationX *pRelationX)=0
## Static Public Member Functions
static QString | addSqlCondition (const QString &sql)
## Protected Attributes
QxCollection< QString, IxDataMember * > * | m_lstDataMemberPtr
| Collection of 'IxDataMember' to build sql query.
IxSqlRelationX * | m_lstSqlRelationPtr
| Collection of 'IxSqlRelation' to build sql query.
IxDataMember * | m_pDataMemberId
| Data member id for sql query.
QString | m_sSqlQuery
| Current sql query.
QString | m_sTableName
| Sql table name of current object.
QString | m_sHashRelation
| Optimization : hash to retrieve sql query with relation.
bool | m_bCartesianProduct
| Recordset can return cartesian product => same id in multiple records.
type_lst_ptr_by_id_ptr | m_pIdX
| Collection of id (and pointer associated) to avoid multiple fetch on same id (cartesian product)
QxSoftDelete | m_oSoftDelete
| Soft delete (or logical delete) behavior.
## Private Member Functions
void | initIdX ()

## Detailed Description

qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database

Definition at line 51 of file IxSqlQueryBuilder.h.

## Member Typedef Documentation

typedef QPair<QString, QString> qx::IxSqlQueryBuilder::type_id

Definition at line 56 of file IxSqlQueryBuilder.h.

typedef QList<type_ptr_by_id_ptr> qx::IxSqlQueryBuilder::type_lst_ptr_by_id

Definition at line 59 of file IxSqlQueryBuilder.h.

typedef boost::shared_ptr<type_lst_ptr_by_id> qx::IxSqlQueryBuilder::type_lst_ptr_by_id_ptr

Definition at line 60 of file IxSqlQueryBuilder.h.

typedef QHash<type_id, void *> qx::IxSqlQueryBuilder::type_ptr_by_id

Definition at line 57 of file IxSqlQueryBuilder.h.

typedef boost::shared_ptr<type_ptr_by_id> qx::IxSqlQueryBuilder::type_ptr_by_id_ptr

Definition at line 58 of file IxSqlQueryBuilder.h.

## Constructor & Destructor Documentation

qx::IxSqlQueryBuilder::IxSqlQueryBuilder | ( |  | ) | `[inline]`

Definition at line 76 of file IxSqlQueryBuilder.h.

qx::IxSqlQueryBuilder::IxSqlQueryBuilder | ( | const QString & | sql | ) | `[inline]`

Definition at line 77 of file IxSqlQueryBuilder.h.

virtual qx::IxSqlQueryBuilder::~IxSqlQueryBuilder | ( |  | ) | `[pure virtual]`

## Member Function Documentation

static QString qx::IxSqlQueryBuilder::addSqlCondition | ( | const QString & | sql | ) | `[inline, static]`

Definition at line 123 of file IxSqlQueryBuilder.h.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::count | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::createTable | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::deleteAll | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::deleteById | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

void qx::IxSqlQueryBuilder::displaySqlQuery | ( | int | time_ms = `-1` | ) | const

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::exist | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

void* qx::IxSqlQueryBuilder::existIdX | ( | long | lIndex,
|  | const QVariant & | idOwner,
|  | const QVariant & | idData
| ) |  |

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchAll | ( | const QStringList & | columns | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchAll | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchAll_WithRelation | ( | IxSqlRelationX * | pRelationX | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchById | ( | const QStringList & | columns | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchById | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::fetchById_WithRelation | ( | IxSqlRelationX * | pRelationX | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

bool qx::IxSqlQueryBuilder::getCartesianProduct | ( |  | ) | const`[inline]`

Definition at line 90 of file IxSqlQueryBuilder.h.

long qx::IxSqlQueryBuilder::getDataCount | ( |  | ) | const`[inline]`

Definition at line 91 of file IxSqlQueryBuilder.h.

IxDataMember* qx::IxSqlQueryBuilder::getDataId | ( |  | ) | const`[inline]`

Definition at line 93 of file IxSqlQueryBuilder.h.

virtual IxDataMemberX* qx::IxSqlQueryBuilder::getDataMemberX | ( |  | ) | const`[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

QString qx::IxSqlQueryBuilder::getHashRelation | ( |  | ) | const`[inline]`

Definition at line 87 of file IxSqlQueryBuilder.h.

QxCollection<QString, IxDataMember *>* qx::IxSqlQueryBuilder::getLstDataMember | ( |  | ) | const`[inline]`

Definition at line 80 of file IxSqlQueryBuilder.h.

IxSqlRelationX* qx::IxSqlQueryBuilder::getLstRelation | ( |  | ) | const`[inline]`

Definition at line 81 of file IxSqlQueryBuilder.h.

long qx::IxSqlQueryBuilder::getRelationCount | ( |  | ) | const`[inline]`

Definition at line 92 of file IxSqlQueryBuilder.h.

QxSoftDelete qx::IxSqlQueryBuilder::getSoftDelete | ( |  | ) | const`[inline]`

Definition at line 89 of file IxSqlQueryBuilder.h.

QString qx::IxSqlQueryBuilder::getSqlQuery | ( |  | ) | const`[inline]`

Definition at line 86 of file IxSqlQueryBuilder.h.

virtual void qx::IxSqlQueryBuilder::init | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

void qx::IxSqlQueryBuilder::initIdX | ( |  | ) | `[private]`

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::insert | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

bool qx::IxSqlQueryBuilder::insertIdX | ( | long | lIndex,
|  | const QVariant & | idOwner,
|  | const QVariant & | idData,
|  | void * | ptr
| ) |  |

IxDataMember* qx::IxSqlQueryBuilder::nextData | ( | long & | l | ) | const`[inline]`

Definition at line 94 of file IxSqlQueryBuilder.h.

IxSqlRelation* qx::IxSqlQueryBuilder::nextRelation | ( | long & | l | ) | const`[inline]`

Definition at line 95 of file IxSqlQueryBuilder.h.

void qx::IxSqlQueryBuilder::setCartesianProduct | ( | bool | b | ) | `[inline]`

Definition at line 85 of file IxSqlQueryBuilder.h.

void qx::IxSqlQueryBuilder::setHashRelation | ( | const QString & | s | ) | `[inline]`

Definition at line 84 of file IxSqlQueryBuilder.h.

void qx::IxSqlQueryBuilder::setSqlQuery | ( | const QString & | sql | ) | `[inline]`

Definition at line 83 of file IxSqlQueryBuilder.h.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::softDeleteAll | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::softDeleteById | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

QString qx::IxSqlQueryBuilder::table | ( |  | ) | const`[inline]`

Definition at line 88 of file IxSqlQueryBuilder.h.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::update | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::update | ( | const QStringList & | columns | ) | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder< T >.

## Member Data Documentation

bool qx::IxSqlQueryBuilder::m_bCartesianProduct`[protected]`

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

Definition at line 70 of file IxSqlQueryBuilder.h.

QxCollection<QString, IxDataMember *>* qx::IxSqlQueryBuilder::m_lstDataMemberPtr`[protected]`

Collection of 'IxDataMember' to build sql query.

Definition at line 64 of file IxSqlQueryBuilder.h.

IxSqlRelationX* qx::IxSqlQueryBuilder::m_lstSqlRelationPtr`[protected]`

Collection of 'IxSqlRelation' to build sql query.

Definition at line 65 of file IxSqlQueryBuilder.h.

QxSoftDelete qx::IxSqlQueryBuilder::m_oSoftDelete`[protected]`

Soft delete (or logical delete) behavior.

Definition at line 72 of file IxSqlQueryBuilder.h.

IxDataMember* qx::IxSqlQueryBuilder::m_pDataMemberId`[protected]`

Data member id for sql query.

Definition at line 66 of file IxSqlQueryBuilder.h.

type_lst_ptr_by_id_ptr qx::IxSqlQueryBuilder::m_pIdX`[protected]`

Collection of id (and pointer associated) to avoid multiple fetch on same id (cartesian product)

Definition at line 71 of file IxSqlQueryBuilder.h.

QString qx::IxSqlQueryBuilder::m_sHashRelation`[protected]`

Optimization : hash to retrieve sql query with relation.

Definition at line 69 of file IxSqlQueryBuilder.h.

QString qx::IxSqlQueryBuilder::m_sSqlQuery`[protected]`

Current sql query.

Definition at line 67 of file IxSqlQueryBuilder.h.

QString qx::IxSqlQueryBuilder::m_sTableName`[protected]`

Sql table name of current object.

Definition at line 68 of file IxSqlQueryBuilder.h.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines