QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches

qx::QxSqlRelationLinked : hierarchy of relationships to build SQL query More...

#include <QxSqlRelationLinked.h>

Public Types

typedef std::shared_ptr< QxSqlRelationLinkedtype_ptr
 
typedef std::tuple< qx::dao::sql_join::join_type, IxSqlRelation *, QPair< QSet< QString >, long >, QString, bool > type_relation
 
typedef qx::QxCollection< QString, type_relationtype_lst_relation
 
typedef QHash< QString, type_ptrtype_lst_relation_linked
 

Public Member Functions

 QxSqlRelationLinked ()
 
 QxSqlRelationLinked (bool bRoot)
 
virtual ~QxSqlRelationLinked ()
 
void hierarchySelect (QxSqlRelationParams &params)
 
void hierarchyFrom (QxSqlRelationParams &params)
 
void hierarchyJoin (QxSqlRelationParams &params)
 
void hierarchyWhereSoftDelete (QxSqlRelationParams &params)
 
void hierarchyResolveOutput (QxSqlRelationParams &params)
 
QSqlError hierarchyOnBeforeSave (QxSqlRelationParams &params)
 
QSqlError hierarchyOnAfterSave (QxSqlRelationParams &params)
 
void updateOffset (QxSqlRelationParams &params)
 
bool getCartesianProduct () const
 
long getAllRelationCount () const
 
long getRelationCount () const
 
bool existRelation (const QString &sKey) const
 
type_lst_relation_linked getRelationLinkedX () const
 
type_lst_relation getRelationX () const
 
bool isRoot () const
 
bool checkRootColumns (const QString &s) const
 
long getRootColumnsCount () const
 
long getRootColumnsOffset () const
 
void setRootColumnsOffset (long l)
 
QString getRootCustomAlias () const
 

Static Public Member Functions

static type_ptr getHierarchy (IxClass *pClass, const QStringList &sRelationX, qx_bool &bOk, qx::dao::detail::IxDao_Helper *pDaoHelper=NULL)
 

Protected Member Functions

bool isValidDaoHelper (QxSqlRelationParams &params) const
 

Private Attributes

std::unique_ptr< QxSqlRelationLinkedImpl > m_pImpl
 Private implementation idiom.
 

Detailed Description

qx::QxSqlRelationLinked : hierarchy of relationships to build SQL query

Here is the structure, each real relation has a relation linked associated to build the hierarchy, like this :

(<root>, <relation_linked>)
("blog", blog_relation)
("blog", <relation_linked>)
("author", author_relation)
("author", <relation_linked>)
("list_blog", list_blog_relation)
("list_blog", <relation_linked>)
(etc...)
("comment", comment_relation)
("comment", <relation_linked>)
("blog_id", blog_id_relation)
("blog_id", <relation_linked>)
(etc...)
("category", category_relation)
("category", <relation_linked>)
("list_blog", list_blog_relation)
("list_blog", <relation_linked>)
(etc...)

Definition at line 94 of file QxSqlRelationLinked.h.

Member Typedef Documentation

◆ type_lst_relation

◆ type_lst_relation_linked

Definition at line 102 of file QxSqlRelationLinked.h.

◆ type_ptr

Definition at line 99 of file QxSqlRelationLinked.h.

◆ type_relation

typedef std::tuple<qx::dao::sql_join::join_type, IxSqlRelation *, QPair<QSet<QString>, long>, QString, bool> qx::QxSqlRelationLinked::type_relation

Definition at line 100 of file QxSqlRelationLinked.h.

Constructor & Destructor Documentation

◆ QxSqlRelationLinked() [1/2]

qx::QxSqlRelationLinked::QxSqlRelationLinked ( )

◆ QxSqlRelationLinked() [2/2]

qx::QxSqlRelationLinked::QxSqlRelationLinked ( bool bRoot)

◆ ~QxSqlRelationLinked()

virtual qx::QxSqlRelationLinked::~QxSqlRelationLinked ( )
virtual

Member Function Documentation

◆ checkRootColumns()

bool qx::QxSqlRelationLinked::checkRootColumns ( const QString & s) const

◆ existRelation()

bool qx::QxSqlRelationLinked::existRelation ( const QString & sKey) const

◆ getAllRelationCount()

long qx::QxSqlRelationLinked::getAllRelationCount ( ) const

◆ getCartesianProduct()

bool qx::QxSqlRelationLinked::getCartesianProduct ( ) const

◆ getHierarchy()

static type_ptr qx::QxSqlRelationLinked::getHierarchy ( IxClass * pClass,
const QStringList & sRelationX,
qx_bool & bOk,
qx::dao::detail::IxDao_Helper * pDaoHelper = NULL )
static

◆ getRelationCount()

long qx::QxSqlRelationLinked::getRelationCount ( ) const

◆ getRelationLinkedX()

type_lst_relation_linked qx::QxSqlRelationLinked::getRelationLinkedX ( ) const

◆ getRelationX()

type_lst_relation qx::QxSqlRelationLinked::getRelationX ( ) const

◆ getRootColumnsCount()

long qx::QxSqlRelationLinked::getRootColumnsCount ( ) const

◆ getRootColumnsOffset()

long qx::QxSqlRelationLinked::getRootColumnsOffset ( ) const

◆ getRootCustomAlias()

QString qx::QxSqlRelationLinked::getRootCustomAlias ( ) const

◆ hierarchyFrom()

void qx::QxSqlRelationLinked::hierarchyFrom ( QxSqlRelationParams & params)

◆ hierarchyJoin()

void qx::QxSqlRelationLinked::hierarchyJoin ( QxSqlRelationParams & params)

◆ hierarchyOnAfterSave()

QSqlError qx::QxSqlRelationLinked::hierarchyOnAfterSave ( QxSqlRelationParams & params)

◆ hierarchyOnBeforeSave()

QSqlError qx::QxSqlRelationLinked::hierarchyOnBeforeSave ( QxSqlRelationParams & params)

◆ hierarchyResolveOutput()

void qx::QxSqlRelationLinked::hierarchyResolveOutput ( QxSqlRelationParams & params)

◆ hierarchySelect()

void qx::QxSqlRelationLinked::hierarchySelect ( QxSqlRelationParams & params)

◆ hierarchyWhereSoftDelete()

void qx::QxSqlRelationLinked::hierarchyWhereSoftDelete ( QxSqlRelationParams & params)

◆ isRoot()

bool qx::QxSqlRelationLinked::isRoot ( ) const

◆ isValidDaoHelper()

bool qx::QxSqlRelationLinked::isValidDaoHelper ( QxSqlRelationParams & params) const
protected

◆ setRootColumnsOffset()

void qx::QxSqlRelationLinked::setRootColumnsOffset ( long l)

◆ updateOffset()

void qx::QxSqlRelationLinked::updateOffset ( QxSqlRelationParams & params)

Member Data Documentation

◆ m_pImpl

std::unique_ptr<QxSqlRelationLinkedImpl> qx::QxSqlRelationLinked::m_pImpl
private

Private implementation idiom.

Definition at line 107 of file QxSqlRelationLinked.h.


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