QxOrm
1.5.0
C++ Object Relational Mapping library
|
qx::dao::detail::IxSqlElement : common interface for all SQL elements to build SQL query More...
#include <IxSqlElement.h>
Public Types | |
enum | type_class { _no_type, _sql_compare, _sql_element_temp, _sql_expression, _sql_free_text, _sql_in, _sql_is_between, _sql_is_null, _sql_limit, _sql_sort, _sql_embed_query } |
Public Member Functions | |
IxSqlElement (int index) | |
virtual | ~IxSqlElement () |
void | setColumn (const QString &column) |
void | setColumns (const QStringList &columns) |
void | setValue (const QVariant &val) |
void | setValues (const QVariantList &values) |
virtual IxSqlElement::type_class | getTypeClass () const =0 |
virtual QString | toString () const =0 |
virtual void | resolve (QSqlQuery &query, qx::QxCollection< QString, QVariantList > *pLstExecBatch=NULL) const =0 |
virtual void | postProcess (QString &sql) const =0 |
virtual void | clone (IxSqlElement *other) |
template<class Archive > | |
void | qxSave (Archive &ar) const |
template<class Archive > | |
void | qxLoad (Archive &ar) |
Protected Member Functions | |
void | updateKeys () |
virtual QString | getExtraSettings () const =0 |
virtual void | setExtraSettings (const QString &s)=0 |
Protected Attributes | |
int | m_iIndex |
Index of SQL element to build unique string. | |
QStringList | m_lstColumns |
List of columns associated to SQL element. | |
QStringList | m_lstKeys |
List of keys associated to SQL element. | |
QList< QVariant > | m_lstValues |
List of values associated to SQL element. | |
IxSqlGenerator * | m_pSqlGenerator |
SQL generator to build SQL query specific for each database. | |
Friends | |
struct | qx::cvt::detail::QxConvert_ToJson< qx::dao::detail::IxSqlElement > |
struct | qx::cvt::detail::QxConvert_FromJson< qx::dao::detail::IxSqlElement > |
QX_DLL_EXPORT QDataStream & | operator<< (QDataStream &stream, const qx::dao::detail::IxSqlElement &t) |
QX_DLL_EXPORT QDataStream & | operator>> (QDataStream &stream, qx::dao::detail::IxSqlElement &t) |
QX_DLL_EXPORT QJsonValue | qx::cvt::detail::QxConvert_ToJson_Helper (const qx::dao::detail::IxSqlElement &t, const QString &format) |
QX_DLL_EXPORT qx_bool | qx::cvt::detail::QxConvert_FromJson_Helper (const QJsonValue &j, qx::dao::detail::IxSqlElement &t, const QString &format) |
qx::dao::detail::IxSqlElement : common interface for all SQL elements to build SQL query
Definition at line 102 of file IxSqlElement.h.
_no_type | |
_sql_compare | |
_sql_element_temp | |
_sql_expression | |
_sql_free_text | |
_sql_in | |
_sql_is_between | |
_sql_is_null | |
_sql_limit | |
_sql_sort | |
_sql_embed_query |
Definition at line 117 of file IxSqlElement.h.
qx::dao::detail::IxSqlElement::IxSqlElement | ( | int | index | ) |
virtual qx::dao::detail::IxSqlElement::~IxSqlElement | ( | ) | [virtual] |
virtual void qx::dao::detail::IxSqlElement::clone | ( | IxSqlElement * | other | ) | [virtual] |
virtual QString qx::dao::detail::IxSqlElement::getExtraSettings | ( | ) | const [protected, pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlLimit, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, and qx::dao::detail::QxSqlElementTemp.
virtual IxSqlElement::type_class qx::dao::detail::IxSqlElement::getTypeClass | ( | ) | const [pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlLimit, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, and qx::dao::detail::QxSqlElementTemp.
virtual void qx::dao::detail::IxSqlElement::postProcess | ( | QString & | sql | ) | const [pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, qx::dao::detail::QxSqlLimit, and qx::dao::detail::QxSqlElementTemp.
void qx::dao::detail::IxSqlElement::qxLoad | ( | Archive & | ar | ) | [inline] |
Definition at line 161 of file IxSqlElement.h.
void qx::dao::detail::IxSqlElement::qxSave | ( | Archive & | ar | ) | const [inline] |
Definition at line 148 of file IxSqlElement.h.
virtual void qx::dao::detail::IxSqlElement::resolve | ( | QSqlQuery & | query, |
qx::QxCollection< QString, QVariantList > * | pLstExecBatch = NULL |
||
) | const [pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, qx::dao::detail::QxSqlLimit, and qx::dao::detail::QxSqlElementTemp.
void qx::dao::detail::IxSqlElement::setColumn | ( | const QString & | column | ) |
void qx::dao::detail::IxSqlElement::setColumns | ( | const QStringList & | columns | ) |
virtual void qx::dao::detail::IxSqlElement::setExtraSettings | ( | const QString & | s | ) | [protected, pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlLimit, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, and qx::dao::detail::QxSqlElementTemp.
void qx::dao::detail::IxSqlElement::setValue | ( | const QVariant & | val | ) |
void qx::dao::detail::IxSqlElement::setValues | ( | const QVariantList & | values | ) |
virtual QString qx::dao::detail::IxSqlElement::toString | ( | ) | const [pure virtual] |
Implemented in qx::dao::detail::QxSqlEmbedQuery, qx::dao::detail::QxSqlCompare, qx::dao::detail::QxSqlExpression, qx::dao::detail::QxSqlIn, qx::dao::detail::QxSqlIsBetween, qx::dao::detail::QxSqlIsNull, qx::dao::detail::QxSqlSort, qx::dao::detail::QxSqlFreeText, qx::dao::detail::QxSqlLimit, and qx::dao::detail::QxSqlElementTemp.
void qx::dao::detail::IxSqlElement::updateKeys | ( | ) | [protected] |
QX_DLL_EXPORT QDataStream& operator<< | ( | QDataStream & | stream, |
const qx::dao::detail::IxSqlElement & | t | ||
) | [friend] |
QX_DLL_EXPORT QDataStream& operator>> | ( | QDataStream & | stream, |
qx::dao::detail::IxSqlElement & | t | ||
) | [friend] |
friend struct qx::cvt::detail::QxConvert_FromJson< qx::dao::detail::IxSqlElement > [friend] |
Definition at line 110 of file IxSqlElement.h.
QX_DLL_EXPORT qx_bool qx::cvt::detail::QxConvert_FromJson_Helper | ( | const QJsonValue & | j, |
qx::dao::detail::IxSqlElement & | t, | ||
const QString & | format | ||
) | [friend] |
friend struct qx::cvt::detail::QxConvert_ToJson< qx::dao::detail::IxSqlElement > [friend] |
Definition at line 109 of file IxSqlElement.h.
QX_DLL_EXPORT QJsonValue qx::cvt::detail::QxConvert_ToJson_Helper | ( | const qx::dao::detail::IxSqlElement & | t, |
const QString & | format | ||
) | [friend] |
int qx::dao::detail::IxSqlElement::m_iIndex [protected] |
Index of SQL element to build unique string.
Definition at line 122 of file IxSqlElement.h.
QStringList qx::dao::detail::IxSqlElement::m_lstColumns [protected] |
List of columns associated to SQL element.
Definition at line 123 of file IxSqlElement.h.
QStringList qx::dao::detail::IxSqlElement::m_lstKeys [protected] |
List of keys associated to SQL element.
Definition at line 124 of file IxSqlElement.h.
QList<QVariant> qx::dao::detail::IxSqlElement::m_lstValues [protected] |
List of values associated to SQL element.
Definition at line 125 of file IxSqlElement.h.
SQL generator to build SQL query specific for each database.
Definition at line 126 of file IxSqlElement.h.