| QxOrm 1.4.4 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 | Protected Attributes
qx::QxSqlRelationParams Class Reference
QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)

qx::QxSqlRelationParams : define list of parameters to transfer to relationships to manage SQL queries builded by QxOrm library More...

`#include <QxSqlRelationParams.h>`

List of all members.

## Public Types
typedef std::shared_ptr < QxSqlRelationLinked > | type_relation_linked_ptr
typedef QHash< QString, type_relation_linked_ptr > | type_lst_relation_linked
## Public Member Functions
| QxSqlRelationParams ()
| QxSqlRelationParams (long lIndex, long lOffset, QString *sql, IxSqlQueryBuilder *builder, QSqlQuery *query, void *pOwner)
| QxSqlRelationParams (long lIndex, long lOffset, QString *sql, IxSqlQueryBuilder *builder, QSqlQuery *query, void *pOwner, const QVariant &vId)
virtual | ~QxSqlRelationParams ()
QVariant | id () const
long | index () const
long | indexOwner () const
long | offset () const
QString & | sql ()
const QString & | sql () const
QSqlQuery & | query ()
const QSqlQuery & | query () const
QSqlDatabase & | database ()
const QSqlDatabase & | database () const
IxSqlQueryBuilder & | builder ()
const IxSqlQueryBuilder & | builder () const
void * | owner () const
qx::dao::sql_join::join_type | joinType () const
type_lst_relation_linked * | relationX () const
QString | getTableAlias () const
qx::dao::save_mode::e_save_mode | saveMode () const
bool | recursiveMode () const
bool | existRecursiveItem (void *p) const
QSet< QString > | getColumns () const
bool | checkColumns (const QString &s) const
long | getColumnsCount () const
long | getColumnsOffset () const
void | setId (const QVariant &vId)
void | setIndex (long lIndex)
void | setIndexOwner (long lIndex)
void | setOffset (long lOffset)
void | setSql (QString *sql)
void | setBuilder (IxSqlQueryBuilder *builder)
void | setQuery (QSqlQuery *query)
void | setDatabase (QSqlDatabase *database)
void | setOwner (void *pOwner)
void | setJoinType (qx::dao::sql_join::join_type e)
void | setRelationX (type_lst_relation_linked *p)
void | setTableAlias (const QString &s)
void | setSaveMode (qx::dao::save_mode::e_save_mode e)
void | setRecursiveMode (bool b)
void | insertRecursiveItem (void *p)
void | setColumns (QPair< QSet< QString >, long > *p)
void | setColumnsOffset (long l)
## Protected Attributes
QVariant | m_vId
| Current id.
long | m_lIndex
| Current SQL relation index.
long | m_lIndexOwner
| Current SQL relation owner index.
long | m_lOffset
| Current SQL query offset.
QString * | m_sql
| Current SQL query.
IxSqlQueryBuilder * | m_builder
| Current SQL query builder.
QSqlQuery * | m_query
| Current SQL query connected to database.
QSqlDatabase * | m_database
| Current SQL database connexion.
void * | m_pOwner
| Owner to current object to resolve input/output.
qx::dao::sql_join::join_type | m_eJoinType
| Current join type to build SQL query : LEFT OUTER JOIN, INNER JOIN, etc...
type_lst_relation_linked * | m_pRelationX
| Current list of relations used by qx::QxSqlRelationLinked class.
QString | m_sTableAlias
| Current SQL table alias : useful for relationships defined in base class.
qx::dao::save_mode::e_save_mode | m_eSaveMode
| Used to improve performance, if you know that you are just inserting or updating items in database.
bool | m_bRecursiveMode
| Recursive mode to iterate over each level of relationship.
QSet< void * > | m_lstRecursiveItems
| Used by recursive process to avoid infinite loop.
QPair< QSet< QString >, long > * | m_pColumns
| List of relation columns to fetch (syntax : my_relation { column_1, column_2, etc... }), if empty then fetch all columns.

## Detailed Description

qx::QxSqlRelationParams : define list of parameters to transfer to relationships to manage SQL queries builded by QxOrm library

Definition at line 64 of file QxSqlRelationParams.h.

## Member Typedef Documentation

typedef QHash<QString, type_relation_linked_ptr> qx::QxSqlRelationParams::type_lst_relation_linked

Definition at line 70 of file QxSqlRelationParams.h.

typedef std::shared_ptr<QxSqlRelationLinked> qx::QxSqlRelationParams::type_relation_linked_ptr

Definition at line 69 of file QxSqlRelationParams.h.

## Constructor & Destructor Documentation

qx::QxSqlRelationParams::QxSqlRelationParams | ( |  | ) |

qx::QxSqlRelationParams::QxSqlRelationParams | ( | long | lIndex,
|  | long | lOffset,
|  | QString * | sql,
|  | IxSqlQueryBuilder * | builder,
|  | QSqlQuery * | query,
|  | void * | pOwner
| ) |  |

qx::QxSqlRelationParams::QxSqlRelationParams | ( | long | lIndex,
|  | long | lOffset,
|  | QString * | sql,
|  | IxSqlQueryBuilder * | builder,
|  | QSqlQuery * | query,
|  | void * | pOwner,
|  | const QVariant & | vId
| ) |  |

virtual qx::QxSqlRelationParams::~QxSqlRelationParams | ( |  | ) | `[virtual]`

## Member Function Documentation

IxSqlQueryBuilder& qx::QxSqlRelationParams::builder | ( |  | ) | `[inline]`

Definition at line 108 of file QxSqlRelationParams.h.

const IxSqlQueryBuilder& qx::QxSqlRelationParams::builder | ( |  | ) | const`[inline]`

Definition at line 109 of file QxSqlRelationParams.h.

bool qx::QxSqlRelationParams::checkColumns | ( | const QString & | s | ) | const`[inline]`

Definition at line 118 of file QxSqlRelationParams.h.

QSqlDatabase& qx::QxSqlRelationParams::database | ( |  | ) | `[inline]`

Definition at line 106 of file QxSqlRelationParams.h.

const QSqlDatabase& qx::QxSqlRelationParams::database | ( |  | ) | const`[inline]`

Definition at line 107 of file QxSqlRelationParams.h.

bool qx::QxSqlRelationParams::existRecursiveItem | ( | void * | p | ) | const`[inline]`

Definition at line 116 of file QxSqlRelationParams.h.

QSet<QString> qx::QxSqlRelationParams::getColumns | ( |  | ) | const`[inline]`

Definition at line 117 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::getColumnsCount | ( |  | ) | const`[inline]`

Definition at line 119 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::getColumnsOffset | ( |  | ) | const`[inline]`

Definition at line 120 of file QxSqlRelationParams.h.

QString qx::QxSqlRelationParams::getTableAlias | ( |  | ) | const`[inline]`

Definition at line 113 of file QxSqlRelationParams.h.

QVariant qx::QxSqlRelationParams::id | ( |  | ) | const`[inline]`

Definition at line 98 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::index | ( |  | ) | const`[inline]`

Definition at line 99 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::indexOwner | ( |  | ) | const`[inline]`

Definition at line 100 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::insertRecursiveItem | ( | void * | p | ) | `[inline]`

Definition at line 136 of file QxSqlRelationParams.h.

qx::dao::sql_join::join_type qx::QxSqlRelationParams::joinType | ( |  | ) | const`[inline]`

Definition at line 111 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::offset | ( |  | ) | const`[inline]`

Definition at line 101 of file QxSqlRelationParams.h.

void* qx::QxSqlRelationParams::owner | ( |  | ) | const`[inline]`

Definition at line 110 of file QxSqlRelationParams.h.

QSqlQuery& qx::QxSqlRelationParams::query | ( |  | ) | `[inline]`

Definition at line 104 of file QxSqlRelationParams.h.

const QSqlQuery& qx::QxSqlRelationParams::query | ( |  | ) | const`[inline]`

Definition at line 105 of file QxSqlRelationParams.h.

bool qx::QxSqlRelationParams::recursiveMode | ( |  | ) | const`[inline]`

Definition at line 115 of file QxSqlRelationParams.h.

type_lst_relation_linked* qx::QxSqlRelationParams::relationX | ( |  | ) | const`[inline]`

Definition at line 112 of file QxSqlRelationParams.h.

qx::dao::save_mode::e_save_mode qx::QxSqlRelationParams::saveMode | ( |  | ) | const`[inline]`

Definition at line 114 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setBuilder | ( | IxSqlQueryBuilder * | builder | ) | `[inline]`

Definition at line 127 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setColumns | ( | QPair< QSet< QString >, long > * | p | ) | `[inline]`

Definition at line 137 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setColumnsOffset | ( | long | l | ) | `[inline]`

Definition at line 138 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setDatabase | ( | QSqlDatabase * | database | ) | `[inline]`

Definition at line 129 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setId | ( | const QVariant & | vId | ) | `[inline]`

Definition at line 122 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setIndex | ( | long | lIndex | ) | `[inline]`

Definition at line 123 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setIndexOwner | ( | long | lIndex | ) | `[inline]`

Definition at line 124 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setJoinType | ( | qx::dao::sql_join::join_type | e | ) | `[inline]`

Definition at line 131 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setOffset | ( | long | lOffset | ) | `[inline]`

Definition at line 125 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setOwner | ( | void * | pOwner | ) | `[inline]`

Definition at line 130 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setQuery | ( | QSqlQuery * | query | ) | `[inline]`

Definition at line 128 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setRecursiveMode | ( | bool | b | ) | `[inline]`

Definition at line 135 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setRelationX | ( | type_lst_relation_linked * | p | ) | `[inline]`

Definition at line 132 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setSaveMode | ( | qx::dao::save_mode::e_save_mode | e | ) | `[inline]`

Definition at line 134 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setSql | ( | QString * | sql | ) | `[inline]`

Definition at line 126 of file QxSqlRelationParams.h.

void qx::QxSqlRelationParams::setTableAlias | ( | const QString & | s | ) | `[inline]`

Definition at line 133 of file QxSqlRelationParams.h.

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

Definition at line 102 of file QxSqlRelationParams.h.

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

Definition at line 103 of file QxSqlRelationParams.h.

## Member Data Documentation

bool qx::QxSqlRelationParams::m_bRecursiveMode`[protected]`

Recursive mode to iterate over each level of relationship.

Definition at line 87 of file QxSqlRelationParams.h.

IxSqlQueryBuilder* qx::QxSqlRelationParams::m_builder`[protected]`

Current SQL query builder.

Definition at line 79 of file QxSqlRelationParams.h.

QSqlDatabase* qx::QxSqlRelationParams::m_database`[protected]`

Current SQL database connexion.

Definition at line 81 of file QxSqlRelationParams.h.

qx::dao::sql_join::join_type qx::QxSqlRelationParams::m_eJoinType`[protected]`

Current join type to build SQL query : LEFT OUTER JOIN, INNER JOIN, etc...

Definition at line 83 of file QxSqlRelationParams.h.

qx::dao::save_mode::e_save_mode qx::QxSqlRelationParams::m_eSaveMode`[protected]`

Used to improve performance, if you know that you are just inserting or updating items in database.

Definition at line 86 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::m_lIndex`[protected]`

Current SQL relation index.

Definition at line 75 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::m_lIndexOwner`[protected]`

Current SQL relation owner index.

Definition at line 76 of file QxSqlRelationParams.h.

long qx::QxSqlRelationParams::m_lOffset`[protected]`

Current SQL query offset.

Definition at line 77 of file QxSqlRelationParams.h.

QSet<void *> qx::QxSqlRelationParams::m_lstRecursiveItems`[protected]`

Used by recursive process to avoid infinite loop.

Definition at line 88 of file QxSqlRelationParams.h.

QPair<QSet<QString>, long>* qx::QxSqlRelationParams::m_pColumns`[protected]`

List of relation columns to fetch (syntax : my_relation { column_1, column_2, etc... }), if empty then fetch all columns.

Definition at line 89 of file QxSqlRelationParams.h.

void* qx::QxSqlRelationParams::m_pOwner`[protected]`

Owner to current object to resolve input/output.

Definition at line 82 of file QxSqlRelationParams.h.

type_lst_relation_linked* qx::QxSqlRelationParams::m_pRelationX`[protected]`

Current list of relations used by qx::QxSqlRelationLinked class.

Definition at line 84 of file QxSqlRelationParams.h.

QSqlQuery* qx::QxSqlRelationParams::m_query`[protected]`

Current SQL query connected to database.

Definition at line 80 of file QxSqlRelationParams.h.

QString* qx::QxSqlRelationParams::m_sql`[protected]`

Current SQL query.

Definition at line 78 of file QxSqlRelationParams.h.

QString qx::QxSqlRelationParams::m_sTableAlias`[protected]`

Current SQL table alias : useful for relationships defined in base class.

Definition at line 85 of file QxSqlRelationParams.h.

QVariant qx::QxSqlRelationParams::m_vId`[protected]`

Current id.

Definition at line 74 of file QxSqlRelationParams.h.

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

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