| QxOrm 1.2.7 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 builded by the program. More...

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

Go to the source code of this file.

## Classes
class | qx::QxSqlQueryBuilder< T >
| qx::QxSqlQueryBuilder<T> : concrete SQL query builder for the class T with a cache mechanism to backup and restore queries already builded by the program 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()
#define | QX_SQL_BUILDER_INIT_FCT_WITH_RELATION()

## Detailed Description

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

Author:
  Lionel Marty

Definition in file QxSqlQueryBuilder.h.

## Define Documentation

#define QX_SQL_BUILDER_INIT_FCT | ( |  | ) |

Value:

    static QString sql = ""; \
    QMutexLocker locker(& QxSqlQueryBuilder<T>::m_oMutex); \
    if (! sql.isEmpty()) { setSqlQuery(sql); return (* this); }

Definition at line 59 of file QxSqlQueryBuilder.h.

#define QX_SQL_BUILDER_INIT_FCT_WITH_RELATION | ( |  | ) |

Value:

    static QHash<QString, QString> sqlX; \
    static QHash<QString, QHash<QString, QString> > sqlAliasX; \
    QMutexLocker locker(& QxSqlQueryBuilder<T>::m_oMutex); \
    QString sql = sqlX.value(m_sHashRelation); \
    if (! sql.isEmpty()) { setSqlQuery(sql); m_lstSqlQueryAlias = sqlAliasX.value(m_sHashRelation); 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 56 of file QxSqlQueryBuilder.h.

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

Definition at line 57 of file QxSqlQueryBuilder.h.