| QxOrm 1.4.8 C++ Object Relational Mapping library

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

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

Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
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 Member Functions
| IxSqlQueryBuilder ()
virtual | ~IxSqlQueryBuilder ()=0
IxDataMemberX * | getDataMemberX () const
QxCollection< QString, IxDataMember * > * | getLstDataMember () const
IxSqlRelationX * | getLstRelation () const
qx::dao::detail::IxDao_Helper * | getDaoHelper () const
void | setDaoHelper (qx::dao::detail::IxDao_Helper *p)
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 | initIdX (long lAllRelationCount)
bool | insertIdX (long lIndex, const QVariant &idOwner, const QVariant &idData, void *ptr)
void * | existIdX (long lIndex, const QVariant &idOwner, const QVariant &idData)
void | setSqlQuery (const QString &sql, const QString &key=QString())
void | addSqlQueryAlias (const QString &sql, const QString &sqlAlias)
bool | getAddAutoIncrementIdToUpdateQuery () const
void | replaceSqlQueryAlias (QString &sql) const
virtual void | init ()
virtual void | clone (const IxSqlQueryBuilder &other)
virtual IxSqlQueryBuilder & | buildSql (const QStringList &columns=QStringList(), QxSqlRelationLinked *pRelationX=NULL)=0
## Static Public Member Functions
static QString | addSqlCondition (const QString &sql)
static void | sql_CreateTable (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_DeleteById (QString &sql, IxSqlQueryBuilder &builder, bool bSoftDelete)
static void | sql_Exist (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_FetchAll (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_FetchAll (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void | sql_FetchAll_WithRelation (qx::QxSqlRelationLinked *pRelationX, QString &sql, IxSqlQueryBuilder &builder)
static void | sql_FetchById (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_FetchById (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void | sql_FetchById_WithRelation (qx::QxSqlRelationLinked *pRelationX, QString &sql, IxSqlQueryBuilder &builder)
static void | sql_Insert (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_Update (QString &sql, IxSqlQueryBuilder &builder)
static void | sql_Update (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void | sql_Count_WithRelation (qx::QxSqlRelationLinked *pRelationX, QString &sql, IxSqlQueryBuilder &builder)
static void | resolveOutput_FetchAll (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void | resolveOutput_FetchAll (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder, const QStringList &columns)
static void | resolveOutput_FetchAll_WithRelation (qx::QxSqlRelationLinked *pRelationX, void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void | resolveInput_Insert (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void | resolveInput_Update (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void | resolveInput_Update (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder, const QStringList &columns)
## Protected Member Functions
bool | verifyColumns (const QStringList &columns) const QX_USED
bool | isInitDone () const
QxSoftDelete & | softDelete ()
const QxSoftDelete & | softDelete () const
void | setSoftDelete (const QxSoftDelete &o)
void | setDataMemberX (IxDataMemberX *p)
bool | findSqlQuery (const QString &key)
bool | findSqlAlias (const QString &key)
void | insertSqlAlias (const QString &key)
## Private Attributes
std::unique_ptr < IxSqlQueryBuilderImpl > | m_pImpl
| Private implementation idiom.

## Detailed Description

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

Definition at line 68 of file IxSqlQueryBuilder.h.

## Constructor & Destructor Documentation

qx::IxSqlQueryBuilder::IxSqlQueryBuilder | ( |  | ) |

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

## Member Function Documentation

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

Definition at line 112 of file IxSqlQueryBuilder.h.

void qx::IxSqlQueryBuilder::addSqlQueryAlias | ( | const QString & | sql,
|  | const QString & | sqlAlias
| ) |  |

virtual IxSqlQueryBuilder& qx::IxSqlQueryBuilder::buildSql | ( | const QStringList & | columns = `QStringList()`,
|  | QxSqlRelationLinked * | pRelationX = `NULL`
| ) |  | `[pure virtual]`

Implemented in qx::QxSqlQueryBuilder_FetchById_WithRelation< T >, qx::QxSqlQueryBuilder_FetchAll_WithRelation< T >, qx::QxSqlQueryBuilder_Count_WithRelation< T >, qx::QxSqlQueryBuilder_CreateTable< T >, qx::QxSqlQueryBuilder_SoftDeleteById< T >, qx::QxSqlQueryBuilder_DeleteById< T >, qx::QxSqlQueryBuilder_SoftDeleteAll< T >, qx::QxSqlQueryBuilder_DeleteAll< T >, qx::QxSqlQueryBuilder_Update< T >, qx::QxSqlQueryBuilder_Insert< T >, qx::QxSqlQueryBuilder_FetchById< T >, qx::QxSqlQueryBuilder_FetchAll< T >, qx::QxSqlQueryBuilder_Exist< T >, and qx::QxSqlQueryBuilder_Count< T >.

virtual void qx::IxSqlQueryBuilder::clone | ( | const IxSqlQueryBuilder & | other | ) | `[virtual]`

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

bool qx::IxSqlQueryBuilder::findSqlAlias | ( | const QString & | key | ) | `[protected]`

bool qx::IxSqlQueryBuilder::findSqlQuery | ( | const QString & | key | ) | `[protected]`

bool qx::IxSqlQueryBuilder::getAddAutoIncrementIdToUpdateQuery | ( |  | ) | const

bool qx::IxSqlQueryBuilder::getCartesianProduct | ( |  | ) | const

qx::dao::detail::IxDao_Helper* qx::IxSqlQueryBuilder::getDaoHelper | ( |  | ) | const

long qx::IxSqlQueryBuilder::getDataCount | ( |  | ) | const

IxDataMember* qx::IxSqlQueryBuilder::getDataId | ( |  | ) | const

IxDataMemberX* qx::IxSqlQueryBuilder::getDataMemberX | ( |  | ) | const

QString qx::IxSqlQueryBuilder::getHashRelation | ( |  | ) | const

QxCollection<QString, IxDataMember *>* qx::IxSqlQueryBuilder::getLstDataMember | ( |  | ) | const

IxSqlRelationX* qx::IxSqlQueryBuilder::getLstRelation | ( |  | ) | const

long qx::IxSqlQueryBuilder::getRelationCount | ( |  | ) | const

QxSoftDelete qx::IxSqlQueryBuilder::getSoftDelete | ( |  | ) | const

QString qx::IxSqlQueryBuilder::getSqlQuery | ( |  | ) | const

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

Reimplemented in qx::QxSqlQueryBuilder< T >.

void qx::IxSqlQueryBuilder::initIdX | ( | long | lAllRelationCount | ) |

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

void qx::IxSqlQueryBuilder::insertSqlAlias | ( | const QString & | key | ) | `[protected]`

bool qx::IxSqlQueryBuilder::isInitDone | ( |  | ) | const`[protected]`

IxDataMember* qx::IxSqlQueryBuilder::nextData | ( | long & | l | ) | const

IxSqlRelation* qx::IxSqlQueryBuilder::nextRelation | ( | long & | l | ) | const

void qx::IxSqlQueryBuilder::replaceSqlQueryAlias | ( | QString & | sql | ) | const

static void qx::IxSqlQueryBuilder::resolveInput_Insert | ( | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::resolveInput_Update | ( | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::resolveInput_Update | ( | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder,
|  | const QStringList & | columns
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll | ( | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll | ( | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder,
|  | const QStringList & | columns
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll_WithRelation | ( | qx::QxSqlRelationLinked * | pRelationX,
|  | void * | t,
|  | QSqlQuery & | query,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

void qx::IxSqlQueryBuilder::setCartesianProduct | ( | bool | b | ) |

void qx::IxSqlQueryBuilder::setDaoHelper | ( | qx::dao::detail::IxDao_Helper * | p | ) |

void qx::IxSqlQueryBuilder::setDataMemberX | ( | IxDataMemberX * | p | ) | `[protected]`

void qx::IxSqlQueryBuilder::setHashRelation | ( | const QString & | s | ) |

void qx::IxSqlQueryBuilder::setSoftDelete | ( | const QxSoftDelete & | o | ) | `[protected]`

void qx::IxSqlQueryBuilder::setSqlQuery | ( | const QString & | sql,
|  | const QString & | key = `QString()`
| ) |  |

QxSoftDelete& qx::IxSqlQueryBuilder::softDelete | ( |  | ) | `[protected]`

const QxSoftDelete& qx::IxSqlQueryBuilder::softDelete | ( |  | ) | const`[protected]`

static void qx::IxSqlQueryBuilder::sql_Count_WithRelation | ( | qx::QxSqlRelationLinked * | pRelationX,
|  | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_CreateTable | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_DeleteById | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder,
|  | bool | bSoftDelete
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_Exist | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchAll | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchAll | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder,
|  | const QStringList & | columns
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchAll_WithRelation | ( | qx::QxSqlRelationLinked * | pRelationX,
|  | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchById | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchById | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder,
|  | const QStringList & | columns
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_FetchById_WithRelation | ( | qx::QxSqlRelationLinked * | pRelationX,
|  | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_Insert | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_Update | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder
| ) |  | `[static]`

static void qx::IxSqlQueryBuilder::sql_Update | ( | QString & | sql,
|  | IxSqlQueryBuilder & | builder,
|  | const QStringList & | columns
| ) |  | `[static]`

QString qx::IxSqlQueryBuilder::table | ( |  | ) | const

bool qx::IxSqlQueryBuilder::verifyColumns | ( | const QStringList & | columns | ) | const`[protected]`

## Member Data Documentation

std::unique_ptr<IxSqlQueryBuilderImpl> qx::IxSqlQueryBuilder::m_pImpl`[private]`

Private implementation idiom.

Definition at line 73 of file IxSqlQueryBuilder.h.

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

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