QxOrm
1.5.0
C++ Object Relational Mapping library
|
qx::QxSqlRelationParams : define list of parameters to transfer to relationships to manage SQL queries builded by QxOrm library More...
#include <QxSqlRelationParams.h>
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, const QVariant &vId=QVariant(), qx::QxCollection< QString, QVariantList > *pLstExecBatch=NULL) | |
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 |
QString | getCustomAlias () const |
QString | getCustomAliasOwner () const |
qx::QxCollection< QString, QVariantList > * | getLstExecBatch () const |
bool | isDistinct () const |
void | setId (const QVariant &vId) |
void | setIndex (long lIndex) |
void | setIndexOwner (long lIndex) |
void | setOffset (long lOffset) |
void | setSql (QString *sql) |
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) |
void | setCustomAlias (const QString &s) |
void | setCustomAliasOwner (const QString &s) |
void | setLstExecBatch (qx::QxCollection< QString, QVariantList > *p) |
void | setBuilder (IxSqlQueryBuilder *builder) |
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. | |
QString | m_sCustomAlias |
Custom SQL table alias instead of generating a new one automatically. | |
QString | m_sCustomAliasOwner |
Custom SQL table alias owner instead of generating a new one automatically. | |
qx::QxCollection< QString, QVariantList > * | m_pLstExecBatch |
List of data to send to database when QSqlQuery::execBatch() method is used. | |
bool | m_bIsDistinct |
SQL query of type SELECT DISTINCT. |
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.
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.
qx::QxSqlRelationParams::QxSqlRelationParams | ( | ) |
qx::QxSqlRelationParams::QxSqlRelationParams | ( | long | lIndex, |
long | lOffset, | ||
QString * | sql, | ||
IxSqlQueryBuilder * | builder, | ||
QSqlQuery * | query, | ||
void * | pOwner, | ||
const QVariant & | vId = QVariant() , |
||
qx::QxCollection< QString, QVariantList > * | pLstExecBatch = NULL |
||
) |
virtual qx::QxSqlRelationParams::~QxSqlRelationParams | ( | ) | [virtual] |
IxSqlQueryBuilder& qx::QxSqlRelationParams::builder | ( | ) | [inline] |
Definition at line 111 of file QxSqlRelationParams.h.
const IxSqlQueryBuilder& qx::QxSqlRelationParams::builder | ( | ) | const [inline] |
Definition at line 112 of file QxSqlRelationParams.h.
bool qx::QxSqlRelationParams::checkColumns | ( | const QString & | s | ) | const [inline] |
Definition at line 121 of file QxSqlRelationParams.h.
QSqlDatabase& qx::QxSqlRelationParams::database | ( | ) | [inline] |
Definition at line 109 of file QxSqlRelationParams.h.
const QSqlDatabase& qx::QxSqlRelationParams::database | ( | ) | const [inline] |
Definition at line 110 of file QxSqlRelationParams.h.
bool qx::QxSqlRelationParams::existRecursiveItem | ( | void * | p | ) | const [inline] |
Definition at line 119 of file QxSqlRelationParams.h.
QSet<QString> qx::QxSqlRelationParams::getColumns | ( | ) | const [inline] |
Definition at line 120 of file QxSqlRelationParams.h.
long qx::QxSqlRelationParams::getColumnsCount | ( | ) | const [inline] |
Definition at line 122 of file QxSqlRelationParams.h.
long qx::QxSqlRelationParams::getColumnsOffset | ( | ) | const [inline] |
Definition at line 123 of file QxSqlRelationParams.h.
QString qx::QxSqlRelationParams::getCustomAlias | ( | ) | const [inline] |
Definition at line 124 of file QxSqlRelationParams.h.
QString qx::QxSqlRelationParams::getCustomAliasOwner | ( | ) | const [inline] |
Definition at line 125 of file QxSqlRelationParams.h.
qx::QxCollection<QString, QVariantList>* qx::QxSqlRelationParams::getLstExecBatch | ( | ) | const [inline] |
Definition at line 126 of file QxSqlRelationParams.h.
QString qx::QxSqlRelationParams::getTableAlias | ( | ) | const [inline] |
Definition at line 116 of file QxSqlRelationParams.h.
QVariant qx::QxSqlRelationParams::id | ( | ) | const [inline] |
Definition at line 101 of file QxSqlRelationParams.h.
long qx::QxSqlRelationParams::index | ( | ) | const [inline] |
Definition at line 102 of file QxSqlRelationParams.h.
long qx::QxSqlRelationParams::indexOwner | ( | ) | const [inline] |
Definition at line 103 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::insertRecursiveItem | ( | void * | p | ) | [inline] |
Definition at line 142 of file QxSqlRelationParams.h.
bool qx::QxSqlRelationParams::isDistinct | ( | ) | const [inline] |
Definition at line 127 of file QxSqlRelationParams.h.
qx::dao::sql_join::join_type qx::QxSqlRelationParams::joinType | ( | ) | const [inline] |
Definition at line 114 of file QxSqlRelationParams.h.
long qx::QxSqlRelationParams::offset | ( | ) | const [inline] |
Definition at line 104 of file QxSqlRelationParams.h.
void* qx::QxSqlRelationParams::owner | ( | ) | const [inline] |
Definition at line 113 of file QxSqlRelationParams.h.
QSqlQuery& qx::QxSqlRelationParams::query | ( | ) | [inline] |
Definition at line 107 of file QxSqlRelationParams.h.
const QSqlQuery& qx::QxSqlRelationParams::query | ( | ) | const [inline] |
Definition at line 108 of file QxSqlRelationParams.h.
bool qx::QxSqlRelationParams::recursiveMode | ( | ) | const [inline] |
Definition at line 118 of file QxSqlRelationParams.h.
type_lst_relation_linked* qx::QxSqlRelationParams::relationX | ( | ) | const [inline] |
Definition at line 115 of file QxSqlRelationParams.h.
qx::dao::save_mode::e_save_mode qx::QxSqlRelationParams::saveMode | ( | ) | const [inline] |
Definition at line 117 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setBuilder | ( | IxSqlQueryBuilder * | builder | ) |
void qx::QxSqlRelationParams::setColumns | ( | QPair< QSet< QString >, long > * | p | ) | [inline] |
Definition at line 143 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setColumnsOffset | ( | long | l | ) | [inline] |
Definition at line 144 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setCustomAlias | ( | const QString & | s | ) | [inline] |
Definition at line 145 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setCustomAliasOwner | ( | const QString & | s | ) | [inline] |
Definition at line 146 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setDatabase | ( | QSqlDatabase * | database | ) | [inline] |
Definition at line 135 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setId | ( | const QVariant & | vId | ) | [inline] |
Definition at line 129 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setIndex | ( | long | lIndex | ) | [inline] |
Definition at line 130 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setIndexOwner | ( | long | lIndex | ) | [inline] |
Definition at line 131 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setJoinType | ( | qx::dao::sql_join::join_type | e | ) | [inline] |
Definition at line 137 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setLstExecBatch | ( | qx::QxCollection< QString, QVariantList > * | p | ) | [inline] |
Definition at line 147 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setOffset | ( | long | lOffset | ) | [inline] |
Definition at line 132 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setOwner | ( | void * | pOwner | ) | [inline] |
Definition at line 136 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setQuery | ( | QSqlQuery * | query | ) | [inline] |
Definition at line 134 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setRecursiveMode | ( | bool | b | ) | [inline] |
Definition at line 141 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setRelationX | ( | type_lst_relation_linked * | p | ) | [inline] |
Definition at line 138 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setSaveMode | ( | qx::dao::save_mode::e_save_mode | e | ) | [inline] |
Definition at line 140 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setSql | ( | QString * | sql | ) | [inline] |
Definition at line 133 of file QxSqlRelationParams.h.
void qx::QxSqlRelationParams::setTableAlias | ( | const QString & | s | ) | [inline] |
Definition at line 139 of file QxSqlRelationParams.h.
QString& qx::QxSqlRelationParams::sql | ( | ) | [inline] |
Definition at line 105 of file QxSqlRelationParams.h.
const QString& qx::QxSqlRelationParams::sql | ( | ) | const [inline] |
Definition at line 106 of file QxSqlRelationParams.h.
bool qx::QxSqlRelationParams::m_bIsDistinct [protected] |
SQL query of type SELECT DISTINCT.
Definition at line 93 of file QxSqlRelationParams.h.
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.
Current join type to build SQL query : LEFT OUTER JOIN, INNER JOIN, etc...
Definition at line 83 of file QxSqlRelationParams.h.
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.
qx::QxCollection<QString, QVariantList>* qx::QxSqlRelationParams::m_pLstExecBatch [protected] |
List of data to send to database when QSqlQuery::execBatch() method is used.
Definition at line 92 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.
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_sCustomAlias [protected] |
Custom SQL table alias instead of generating a new one automatically.
Definition at line 90 of file QxSqlRelationParams.h.
QString qx::QxSqlRelationParams::m_sCustomAliasOwner [protected] |
Custom SQL table alias owner instead of generating a new one automatically.
Definition at line 91 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.