QxOrm  1.4.5
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>

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
IxSqlQueryBuilderbuilder ()
const IxSqlQueryBuilderbuilder () const
void * owner () const
qx::dao::sql_join::join_type joinType () const
type_lst_relation_linkedrelationX () 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.
IxSqlQueryBuilderm_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_linkedm_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


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

Recursive mode to iterate over each level of relationship.

Definition at line 87 of file QxSqlRelationParams.h.

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.

Current SQL relation index.

Definition at line 75 of file QxSqlRelationParams.h.

Current SQL relation owner index.

Definition at line 76 of file QxSqlRelationParams.h.

Current SQL query offset.

Definition at line 77 of file QxSqlRelationParams.h.

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.

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_sql [protected]

Current SQL query.

Definition at line 78 of file QxSqlRelationParams.h.

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: