| QxOrm 1.4.5 C++ Object Relational Mapping library

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

- File List
- File Members

Classes | Namespaces | Defines
QxSqlQueryBuilder.h File Reference
QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)

Concrete SQL query builder by class with a cache mechanism to backup and restore queries already built by the program. More...

`#include <QxDao/IxSqlQueryBuilder.h>`
`#include <QxDao/QxSqlQueryHelper.h>`
`#include <QxRegister/QxClass.h>`
`#include <QxTraits/remove_attr.h>`
`#include <QxTraits/remove_smart_ptr.h>`
`#include <QxTraits/is_qx_registered.h>`

Go to the source code of this file.

## Classes
class | qx::QxSqlQueryBuilder< T >
| qx::QxSqlQueryBuilder<T> : concrete SQL query builder for class T with a cache mechanism to backup and restore queries already built by the program More...
class | qx::QxSqlQueryBuilder_Count< T >
| qx::QxSqlQueryBuilder_Count<T> : concrete SQL query builder for class T to build a COUNT SQL query More...
class | qx::QxSqlQueryBuilder_Exist< T >
| qx::QxSqlQueryBuilder_Exist<T> : concrete SQL query builder for class T to build an EXIST SQL query More...
class | qx::QxSqlQueryBuilder_FetchAll< T >
| qx::QxSqlQueryBuilder_FetchAll<T> : concrete SQL query builder for class T to build a FETCH ALL SQL query More...
class | qx::QxSqlQueryBuilder_FetchById< T >
| qx::QxSqlQueryBuilder_FetchById<T> : concrete SQL query builder for class T to build a FETCH BY ID SQL query More...
class | qx::QxSqlQueryBuilder_Insert< T >
| qx::QxSqlQueryBuilder_Insert<T> : concrete SQL query builder for class T to build an INSERT SQL query More...
class | qx::QxSqlQueryBuilder_Update< T >
| qx::QxSqlQueryBuilder_Update<T> : concrete SQL query builder for class T to build an UPDATE SQL query More...
class | qx::QxSqlQueryBuilder_DeleteAll< T >
| qx::QxSqlQueryBuilder_DeleteAll<T> : concrete SQL query builder for class T to build a DELETE ALL SQL query More...
class | qx::QxSqlQueryBuilder_SoftDeleteAll< T >
| qx::QxSqlQueryBuilder_SoftDeleteAll<T> : concrete SQL query builder for class T to build a SOFT DELETE ALL SQL query More...
class | qx::QxSqlQueryBuilder_DeleteById< T >
| qx::QxSqlQueryBuilder_DeleteById<T> : concrete SQL query builder for class T to build a DELETE BY ID SQL query More...
class | qx::QxSqlQueryBuilder_SoftDeleteById< T >
| qx::QxSqlQueryBuilder_SoftDeleteById<T> : concrete SQL query builder for class T to build a SOFT DELETE BY ID SQL query More...
class | qx::QxSqlQueryBuilder_CreateTable< T >
| qx::QxSqlQueryBuilder_CreateTable<T> : concrete SQL query builder for class T to build a CREATE TABLE SQL query More...
class | qx::QxSqlQueryBuilder_FetchAll_WithRelation< T >
| qx::QxSqlQueryBuilder_FetchAll_WithRelation<T> : concrete SQL query builder for class T to build a FETCH ALL WITH RELATION SQL query More...
class | qx::QxSqlQueryBuilder_FetchById_WithRelation< T >
| qx::QxSqlQueryBuilder_FetchById_WithRelation<T> : concrete SQL query builder for class T to build a FETCH BY ID WITH RELATION SQL query More...
## Namespaces
namespace | qx
| Root namespace for all QxOrm library features.
## Defines
#define | QX_SQL_ERR_NO_DATA_MEMBER_REGISTERED "'QxSqlQueryBuilder<T>' error : 'qx::register_class()' not called or no data member registered"
#define | QX_SQL_ERR_NO_ID_REGISTERED "'QxSqlQueryBuilder<T>' error : no id registered"
#define | QX_SQL_BUILDER_INIT_FCT(oper)
#define | QX_SQL_BUILDER_INIT_FCT_WITH_RELATION(oper)

## Detailed Description

Concrete SQL query builder by class with a cache mechanism to backup and restore queries already built by the program.

Author:
  Lionel Marty

Definition in file QxSqlQueryBuilder.h.

## Define Documentation

#define QX_SQL_BUILDER_INIT_FCT | ( |  | oper | ) |

Value:

    QMutexLocker locker(& IxSqlQueryBuilder::getMutex()); \
    QString key = QxClass<type_sql>::getSingleton()->getKey() + oper; \
    QString sql = IxSqlQueryBuilder::listSqlQuery().value(key); \
    if (! sql.isEmpty()) { this->setSqlQuery(sql); return (* this); }

Definition at line 58 of file QxSqlQueryBuilder.h.

#define QX_SQL_BUILDER_INIT_FCT_WITH_RELATION | ( |  | oper | ) |

Value:

    QMutexLocker locker(& IxSqlQueryBuilder::getMutex()); \
    QString key = QxClass<type_sql>::getSingleton()->getKey() + this->getHashRelation() + oper; \
    QString sql = IxSqlQueryBuilder::listSqlQuery().value(key); \
    if (! sql.isEmpty()) { this->setSqlQuery(sql); this->listSqlQueryAlias() = IxSqlQueryBuilder::listSqlAlias().value(key); return (* this); }

Definition at line 64 of file QxSqlQueryBuilder.h.

#define QX_SQL_ERR_NO_DATA_MEMBER_REGISTERED "'QxSqlQueryBuilder<T>' error : 'qx::register_class()' not called or no data member registered"

Definition at line 55 of file QxSqlQueryBuilder.h.

#define QX_SQL_ERR_NO_ID_REGISTERED "'QxSqlQueryBuilder<T>' error : no id registered"

Definition at line 56 of file QxSqlQueryBuilder.h.