QxOrm  1.4.5
C++ Object Relational Mapping library

qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database More...

#include <IxSqlQueryBuilder.h>

Inheritance diagram for qx::IxSqlQueryBuilder:
qx::QxSqlQueryBuilder< T > qx::QxSqlQueryBuilder_Count< T > qx::QxSqlQueryBuilder_CreateTable< T > qx::QxSqlQueryBuilder_DeleteAll< T > qx::QxSqlQueryBuilder_DeleteById< T > qx::QxSqlQueryBuilder_Exist< T > qx::QxSqlQueryBuilder_FetchAll< T > qx::QxSqlQueryBuilder_FetchAll_WithRelation< T > qx::QxSqlQueryBuilder_FetchById< T > qx::QxSqlQueryBuilder_FetchById_WithRelation< T > qx::QxSqlQueryBuilder_Insert< T > qx::QxSqlQueryBuilder_SoftDeleteAll< T > qx::QxSqlQueryBuilder_SoftDeleteById< T > qx::QxSqlQueryBuilder_Update< T >

List of all members.

Public Member Functions

 IxSqlQueryBuilder ()
virtual ~IxSqlQueryBuilder ()=0
IxDataMemberXgetDataMemberX () const
QxCollection< QString,
IxDataMember * > * 
getLstDataMember () const
IxSqlRelationXgetLstRelation () const
qx::dao::detail::IxDao_HelpergetDaoHelper () const
void setDaoHelper (qx::dao::detail::IxDao_Helper *p)
void setHashRelation (const QString &s)
void setCartesianProduct (bool b)
QString getSqlQuery () const
QString getHashRelation () const
QString table () const
QxSoftDelete getSoftDelete () const
bool getCartesianProduct () const
long getDataCount () const
long getRelationCount () const
IxDataMembergetDataId () const
IxDataMembernextData (long &l) const
IxSqlRelationnextRelation (long &l) const
void initIdX (long lAllRelationCount)
bool insertIdX (long lIndex, const QVariant &idOwner, const QVariant &idData, void *ptr)
void * existIdX (long lIndex, const QVariant &idOwner, const QVariant &idData)
void setSqlQuery (const QString &sql, const QString &key=QString())
void addSqlQueryAlias (const QString &sql, const QString &sqlAlias)
bool getAddAutoIncrementIdToUpdateQuery () const
void replaceSqlQueryAlias (QString &sql) const
void displaySqlQuery (int time_ms=-1, int time_db=-1, const QString &query=QString()) const
virtual void init ()
virtual void clone (const IxSqlQueryBuilder &other)
virtual IxSqlQueryBuilderbuildSql (const QStringList &columns=QStringList(), QxSqlRelationLinked *pRelationX=NULL)=0

Static Public Member Functions

static QString addSqlCondition (const QString &sql)
static void sql_CreateTable (QString &sql, IxSqlQueryBuilder &builder)
static void sql_DeleteById (QString &sql, IxSqlQueryBuilder &builder, bool bSoftDelete)
static void sql_Exist (QString &sql, IxSqlQueryBuilder &builder)
static void sql_FetchAll (QString &sql, IxSqlQueryBuilder &builder)
static void sql_FetchAll (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void sql_FetchAll_WithRelation (qx::QxSqlRelationLinked *pRelationX, QString &sql, IxSqlQueryBuilder &builder)
static void sql_FetchById (QString &sql, IxSqlQueryBuilder &builder)
static void sql_FetchById (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void sql_FetchById_WithRelation (qx::QxSqlRelationLinked *pRelationX, QString &sql, IxSqlQueryBuilder &builder)
static void sql_Insert (QString &sql, IxSqlQueryBuilder &builder)
static void sql_Update (QString &sql, IxSqlQueryBuilder &builder)
static void sql_Update (QString &sql, IxSqlQueryBuilder &builder, const QStringList &columns)
static void resolveOutput_FetchAll (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void resolveOutput_FetchAll (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder, const QStringList &columns)
static void resolveOutput_FetchAll_WithRelation (qx::QxSqlRelationLinked *pRelationX, void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void resolveInput_Insert (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void resolveInput_Update (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder)
static void resolveInput_Update (void *t, QSqlQuery &query, IxSqlQueryBuilder &builder, const QStringList &columns)

Protected Member Functions

bool verifyColumns (const QStringList &columns) const QX_USED
IxDataMemberisValid_DataMember (long lIndex) const
IxDataMemberisValid_SqlRelation (long lIndex) const
bool isInitDone () const
QxSoftDeletesoftDelete ()
const QxSoftDeletesoftDelete () const
void setSoftDelete (const QxSoftDelete &o)
void setDataMemberX (IxDataMemberX *p)
QHash< QString, QString > & listSqlQueryAlias ()
const QHash< QString, QString > & listSqlQueryAlias () const

Static Protected Member Functions

static QHash< QString, QString > & listSqlQuery ()
static QHash< QString, QHash
< QString, QString > > & 
listSqlAlias ()
static QMutex & getMutex ()

Private Attributes

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

Detailed Description

qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database

Definition at line 68 of file IxSqlQueryBuilder.h.


Constructor & Destructor Documentation

qx::IxSqlQueryBuilder::IxSqlQueryBuilder ( )
virtual qx::IxSqlQueryBuilder::~IxSqlQueryBuilder ( ) [pure virtual]

Member Function Documentation

static QString qx::IxSqlQueryBuilder::addSqlCondition ( const QString &  sql) [inline, static]

Definition at line 113 of file IxSqlQueryBuilder.h.

void qx::IxSqlQueryBuilder::addSqlQueryAlias ( const QString &  sql,
const QString &  sqlAlias 
)
virtual void qx::IxSqlQueryBuilder::clone ( const IxSqlQueryBuilder other) [virtual]
void qx::IxSqlQueryBuilder::displaySqlQuery ( int  time_ms = -1,
int  time_db = -1,
const QString &  query = QString() 
) const
void* qx::IxSqlQueryBuilder::existIdX ( long  lIndex,
const QVariant &  idOwner,
const QVariant &  idData 
)
bool qx::IxSqlQueryBuilder::getAddAutoIncrementIdToUpdateQuery ( ) const
bool qx::IxSqlQueryBuilder::getCartesianProduct ( ) const
qx::dao::detail::IxDao_Helper* qx::IxSqlQueryBuilder::getDaoHelper ( ) const
long qx::IxSqlQueryBuilder::getDataCount ( ) const
IxDataMember* qx::IxSqlQueryBuilder::getDataId ( ) const
IxDataMemberX* qx::IxSqlQueryBuilder::getDataMemberX ( ) const
QString qx::IxSqlQueryBuilder::getHashRelation ( ) const
QxCollection<QString, IxDataMember *>* qx::IxSqlQueryBuilder::getLstDataMember ( ) const
IxSqlRelationX* qx::IxSqlQueryBuilder::getLstRelation ( ) const
static QMutex& qx::IxSqlQueryBuilder::getMutex ( ) [static, protected]
long qx::IxSqlQueryBuilder::getRelationCount ( ) const
QxSoftDelete qx::IxSqlQueryBuilder::getSoftDelete ( ) const
QString qx::IxSqlQueryBuilder::getSqlQuery ( ) const
virtual void qx::IxSqlQueryBuilder::init ( ) [virtual]

Reimplemented in qx::QxSqlQueryBuilder< T >.

void qx::IxSqlQueryBuilder::initIdX ( long  lAllRelationCount)
bool qx::IxSqlQueryBuilder::insertIdX ( long  lIndex,
const QVariant &  idOwner,
const QVariant &  idData,
void *  ptr 
)
bool qx::IxSqlQueryBuilder::isInitDone ( ) const [protected]
IxDataMember* qx::IxSqlQueryBuilder::isValid_DataMember ( long  lIndex) const [protected]
IxDataMember* qx::IxSqlQueryBuilder::isValid_SqlRelation ( long  lIndex) const [protected]
static QHash<QString, QHash<QString, QString> >& qx::IxSqlQueryBuilder::listSqlAlias ( ) [static, protected]
static QHash<QString, QString>& qx::IxSqlQueryBuilder::listSqlQuery ( ) [static, protected]
QHash<QString, QString>& qx::IxSqlQueryBuilder::listSqlQueryAlias ( ) [protected]
const QHash<QString, QString>& qx::IxSqlQueryBuilder::listSqlQueryAlias ( ) const [protected]
IxDataMember* qx::IxSqlQueryBuilder::nextData ( long &  l) const
IxSqlRelation* qx::IxSqlQueryBuilder::nextRelation ( long &  l) const
void qx::IxSqlQueryBuilder::replaceSqlQueryAlias ( QString &  sql) const
static void qx::IxSqlQueryBuilder::resolveInput_Insert ( void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::resolveInput_Update ( void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::resolveInput_Update ( void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder,
const QStringList &  columns 
) [static]
static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll ( void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll ( void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder,
const QStringList &  columns 
) [static]
static void qx::IxSqlQueryBuilder::resolveOutput_FetchAll_WithRelation ( qx::QxSqlRelationLinked pRelationX,
void *  t,
QSqlQuery &  query,
IxSqlQueryBuilder builder 
) [static]
void qx::IxSqlQueryBuilder::setCartesianProduct ( bool  b)
void qx::IxSqlQueryBuilder::setDaoHelper ( qx::dao::detail::IxDao_Helper p)
void qx::IxSqlQueryBuilder::setDataMemberX ( IxDataMemberX p) [protected]
void qx::IxSqlQueryBuilder::setHashRelation ( const QString &  s)
void qx::IxSqlQueryBuilder::setSoftDelete ( const QxSoftDelete o) [protected]
void qx::IxSqlQueryBuilder::setSqlQuery ( const QString &  sql,
const QString &  key = QString() 
)
QxSoftDelete& qx::IxSqlQueryBuilder::softDelete ( ) [protected]
const QxSoftDelete& qx::IxSqlQueryBuilder::softDelete ( ) const [protected]
static void qx::IxSqlQueryBuilder::sql_CreateTable ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_DeleteById ( QString &  sql,
IxSqlQueryBuilder builder,
bool  bSoftDelete 
) [static]
static void qx::IxSqlQueryBuilder::sql_Exist ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchAll ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchAll ( QString &  sql,
IxSqlQueryBuilder builder,
const QStringList &  columns 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchAll_WithRelation ( qx::QxSqlRelationLinked pRelationX,
QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchById ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchById ( QString &  sql,
IxSqlQueryBuilder builder,
const QStringList &  columns 
) [static]
static void qx::IxSqlQueryBuilder::sql_FetchById_WithRelation ( qx::QxSqlRelationLinked pRelationX,
QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_Insert ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_Update ( QString &  sql,
IxSqlQueryBuilder builder 
) [static]
static void qx::IxSqlQueryBuilder::sql_Update ( QString &  sql,
IxSqlQueryBuilder builder,
const QStringList &  columns 
) [static]
QString qx::IxSqlQueryBuilder::table ( ) const
bool qx::IxSqlQueryBuilder::verifyColumns ( const QStringList &  columns) const [protected]

Member Data Documentation

std::unique_ptr<IxSqlQueryBuilderImpl> qx::IxSqlQueryBuilder::m_pImpl [private]

Private implementation idiom.

Definition at line 73 of file IxSqlQueryBuilder.h.


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