QxOrm 1.5.0
C++ Object Relational Mapping library
Loading...
Searching...
No Matches
IxDataMember.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** https://www.qxorm.com/
4** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)
5**
6** This file is part of the QxOrm library
7**
8** This software is provided 'as-is', without any express or implied
9** warranty. In no event will the authors be held liable for any
10** damages arising from the use of this software
11**
12** Commercial Usage
13** Licensees holding valid commercial QxOrm licenses may use this file in
14** accordance with the commercial license agreement provided with the
15** Software or, alternatively, in accordance with the terms contained in
16** a written agreement between you and Lionel Marty
17**
18** GNU General Public License Usage
19** Alternatively, this file may be used under the terms of the GNU
20** General Public License version 3.0 as published by the Free Software
21** Foundation and appearing in the file 'license.gpl3.txt' included in the
22** packaging of this file. Please review the following information to
23** ensure the GNU General Public License version 3.0 requirements will be
24** met : http://www.gnu.org/copyleft/gpl.html
25**
26** If you are unsure which license is appropriate for your use, or
27** if you have questions regarding the use of this file, please contact :
28** contact@qxorm.com
29**
30****************************************************************************/
31
32#ifndef _IX_DATA_MEMBER_H_
33#define _IX_DATA_MEMBER_H_
34
35#ifdef _MSC_VER
36#pragma once
37#endif
38
45
46#ifdef _MSC_VER
47#pragma warning(push)
48#pragma warning(disable:4996)
49#endif // _MSC_VER
50
51#include <QtCore/qmutex.h>
52#include <QtSql/qsqlquery.h>
53
54#ifndef _QX_NO_JSON
55#include <QtCore/qjsonvalue.h>
56#endif // _QX_NO_JSON
57
58#include <QxCommon/QxAny.h>
59#include <QxCommon/QxBool.h>
61
63
65
66#include <QxConvert/QxConvert.h>
67
68#ifdef _MSC_VER
69#pragma warning(pop)
70#endif // _MSC_VER
71
72#define QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(ArchiveInput, ArchiveOutput) \
73virtual void toArchive(const void * pOwner, ArchiveOutput & ar) const = 0; \
74virtual void fromArchive(void * pOwner, ArchiveInput & ar) = 0;
75
76namespace qx {
77
78class IxDataMemberX;
79class IxSqlRelation;
80class IxSqlQueryBuilder;
81struct IxDataMemberSqlCallbackParams;
82
83namespace dao {
84namespace detail {
85
86class IxDao_Helper;
87
88} // namespace detail
89} // namespace dao
90
96{
97
98 template <typename DataType, class Owner>
99 friend class QxDataMember;
100
101public:
102
104
105private:
106
107 struct IxDataMemberImpl;
108 std::unique_ptr<IxDataMemberImpl> m_pImpl;
109
110 static QMutex m_mutex;
111
112public:
113
114 IxDataMember(const QString & sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember * pImpl);
115 virtual ~IxDataMember() = 0;
116
117 QString getKey() const;
118 QString getName() const;
119 int getNameCount() const;
120 QString getNameParent() const;
121 const char * getNamePtr() const;
122 QString getDescription() const;
123 QString getFormat() const;
124 long getVersion() const;
125 bool getSerialize() const;
126 bool getDao() const;
127 QVariant getDefaultValue() const;
128 QVariant getMinValue() const;
129 QVariant getMaxValue() const;
130 int getPrecision() const;
131 int getMinLength() const;
132 int getMaxLength() const;
133 bool getRequired() const;
134 bool getReadOnly() const;
135 bool getAutoIncrement() const;
136 bool getNotNull() const;
137 bool getIsPrimaryKey() const;
138 bool getIsIndex() const;
139 bool getIsUnique() const;
142 bool hasSqlRelation() const;
144 virtual QString getType() const;
145 QString getTypeParent() const;
147
148 void setName(const QString & s);
149 void setNameParent(const QString & s);
150 void setDescription(const QString & s);
151 void setFormat(const QString & s);
152 void setSqlType(const QString & s);
153 void setSqlAlias(const QString & s);
154 void setVersion(long l);
155 void setSerialize(bool b);
156 void setDao(bool b);
157 void setDefaultValue(const QVariant & v);
158 void setPrecision(int i);
159 void setRequired(bool b);
160 void setReadOnly(bool b);
161 void setAutoIncrement(bool b);
162 void setIsPrimaryKey(bool b);
163 void setIsIndex(bool b);
164 void setIsUnique(bool b);
168
169 void setMinValue(long lMinValue, const QString & sMessage = QString());
170 void setMinValue(double dMinValue, const QString & sMessage = QString());
171 void setMaxValue(long lMaxValue, const QString & sMessage = QString());
172 void setMaxValue(double dMaxValue, const QString & sMessage = QString());
173 void setMinLength(int iMinLength, const QString & sMessage = QString());
174 void setMaxLength(int iMaxLength, const QString & sMessage = QString());
175 void setNotNull(bool bNotNull, const QString & sMessage = QString());
176
177 bool isThereRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation * & pRelation, int & iIndexNameFK) const;
178 bool isPartOfPrimaryKey(int iIndexNameFK, IxDataMember * & pPrimaryKey, int & iIndexNamePK) const;
179 void setRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation * pRelation, int iIndexNameFK);
180 void setPartOfPrimaryKey(int iIndexNameFK, IxDataMember * pPrimaryKey, int iIndexNamePK);
181
182 QString getName(int iIndex, const QString & sOtherName = QString()) const;
183 QString getSqlAlias(const QString & sTable = QString(), bool bClauseWhere = false, int iIndexName = 0, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
184 QString getSqlType(int iIndexName = -1) const;
185 QString getSqlTypeAndParams(int iIndexName = -1) const;
186 QString getSqlPlaceHolder(const QString & sAppend = QString(), int iIndexName = 0, const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false) const;
187 void setSqlPlaceHolder(QSqlQuery & query, void * pOwner, const QString & sAppend = QString(), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false, qx::QxCollection<QString, QVariantList> * pLstExecBatch = NULL) const;
188 QString getSqlAliasEqualToPlaceHolder(const QString & sTable = QString(), bool bClauseWhere = false, const QString & sAppend = QString(), const QString & sSep = QString(" AND "), bool bCheckFKPartOfPK = false, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
189 QString getSqlNameEqualToPlaceHolder(const QString & sAppend = QString(), const QString & sSep = QString(" AND "), bool bCheckFKPartOfPK = false, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
190 QString getSqlTablePointNameAsAlias(const QString & sTable, const QString & sSep = QString(", "), const QString & sSuffixAlias = QString(), bool bCheckFKPartOfPK = false, const QString & sCustomAlias = QString(), qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
191 QString getSqlName(const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
192 QString getSqlNameAndTypeAndParams(const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false) const;
193
199
200 static QString getSqlFromTable(const QString & sTable, const QString & sCustomAlias = QString());
201 static QString getSqlTableName(const QString & sTable);
202 static QString getSqlColumnName(const QString & sColumn);
203 static QString getSqlTableNameAlias(const QString & sTable);
204 static QString getSqlColumnNameAlias(const QString & sColumn);
205
206 virtual bool isEqual(const void * pOwner1, const void * pOwner2) const = 0;
207 virtual QVariant toVariant(const void * pOwner, const QString & sFormat, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context) const = 0;
208 virtual qx_bool fromVariant(void * pOwner, const QVariant & v, const QString & sFormat, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context) = 0;
209
210 QVariant toVariant(const void * pOwner, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context) const;
211 qx_bool fromVariant(void * pOwner, const QVariant & v, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context);
212
213#ifndef _QX_NO_JSON
214 virtual QJsonValue toJson(const void * pOwner, const QString & sFormat) const = 0;
215 virtual qx_bool fromJson(void * pOwner, const QJsonValue & j, const QString & sFormat) = 0;
216
217 QJsonValue toJson(const void * pOwner) const;
218 qx_bool fromJson(void * pOwner, const QJsonValue & j);
219#endif // _QX_NO_JSON
220
221protected:
222
223 virtual qx::any getDataPtr(const void * pOwner) const = 0;
224 virtual qx::any getDataPtr(void * pOwner) = 0;
225 virtual void * getDataVoidPtr(const void * pOwner) const = 0;
226 virtual void * getDataVoidPtr(void * pOwner) = 0;
227
228public:
229
230 qx::any getValueAnyPtr(const void * pOwner) const { return this->getDataPtr(pOwner); }
231 qx::any getValueAnyPtr(void * pOwner) { return this->getDataPtr(pOwner); }
232 void * getValueVoidPtr(const void * pOwner) const { return this->getDataVoidPtr(pOwner); }
233 void * getValueVoidPtr(void * pOwner) { return this->getDataVoidPtr(pOwner); }
234
235 template <typename T>
236 T * getValuePtr(void * pOwner, bool * bOk = NULL)
237 {
238 if (bOk) { (* bOk) = false; }
239 if (! getAccessDataPointer()) { qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "cannot access data-member pointer"); return NULL; }
240 qx::any a = this->getDataPtr(pOwner);
241 try { T * t = qx::any_cast<T *>(a); if (bOk) { (* bOk) = (t != NULL); }; return t; }
242 catch (const qx::bad_any_cast & err) { Q_UNUSED(err); qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "bad any cast exception"); return NULL; }
243 catch (...) { qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "unknown cast exception"); return NULL; }
244 }
245
246 template <typename T>
247 T getValue(void * pOwner, bool * bOk = NULL)
248 {
249 if (! getAccessDataPointer()) { return qxCannotAccessDataPointer<T, 0>::getValue(this, pOwner, bOk); }
250 T * t = this->getValuePtr<T>(pOwner, bOk);
251 return (t ? (* t) : T());
252 }
253
254 template <typename T>
255 bool setValue(void * pOwner, const T & val)
256 {
257 if (! getAccessDataPointer()) { return qxCannotAccessDataPointer<T, 0>::setValue(this, pOwner, val); }
258 T * t = this->getValuePtr<T>(pOwner);
259 if (t) { (* t) = val; }
260 return (t != NULL);
261 }
262
263private:
264
265 template <typename T, int dummy>
267 {
268 static T getValue(IxDataMember * pData, void * pOwner, bool * bOk)
269 { Q_UNUSED(pData); Q_UNUSED(pOwner); qDebug("[QxOrm] qx::IxDataMember::qxCannotAccessDataPointer<T>::getValue() : '%s'", "type T not supported"); if (bOk) { (* bOk) = false; }; return T(); }
270 static bool setValue(IxDataMember * pData, void * pOwner, const T & val)
271 { Q_UNUSED(pData); Q_UNUSED(pOwner); Q_UNUSED(val); qDebug("[QxOrm] qx::IxDataMember::qxCannotAccessDataPointer<T>::setValue() : '%s'", "type T not supported"); return false; }
272 };
273
274 template <int dummy>
275 struct qxCannotAccessDataPointer<QVariant, dummy>
276 {
277 static QVariant getValue(IxDataMember * pData, void * pOwner, bool * bOk)
278 { if (bOk) { (* bOk) = (pData != NULL); }; return (pData ? pData->toVariant(pOwner, "") : QVariant()); }
279 static bool setValue(IxDataMember * pData, void * pOwner, const QVariant & val)
280 { return (pData ? pData->fromVariant(pOwner, val, "").getValue() : false); }
281 };
282
283 template <int dummy>
284 struct qxCannotAccessDataPointer<QString, dummy>
285 {
286 static QString getValue(IxDataMember * pData, void * pOwner, bool * bOk)
287 { if (bOk) { (* bOk) = (pData != NULL); }; return (pData ? pData->toVariant(pOwner, "").toString() : QString()); }
288 static bool setValue(IxDataMember * pData, void * pOwner, const QString & val)
289 { QVariant tmp(val); return (pData ? pData->fromVariant(pOwner, tmp, "").getValue() : false); }
290 };
291
292public:
293
294#ifdef _QX_ENABLE_BOOST_SERIALIZATION
295
296#if _QX_SERIALIZE_POLYMORPHIC
297 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::polymorphic_iarchive, boost::archive::polymorphic_oarchive)
298#endif // _QX_SERIALIZE_POLYMORPHIC
299
300#if _QX_SERIALIZE_BINARY
301 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::binary_iarchive, boost::archive::binary_oarchive)
302#endif // _QX_SERIALIZE_BINARY
303
304#if _QX_SERIALIZE_TEXT
305 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::text_iarchive, boost::archive::text_oarchive)
306#endif // _QX_SERIALIZE_TEXT
307
308#if _QX_SERIALIZE_XML
309 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::xml_iarchive, boost::archive::xml_oarchive)
310#endif // _QX_SERIALIZE_XML
311
312#if _QX_SERIALIZE_PORTABLE_BINARY
314#endif // _QX_SERIALIZE_PORTABLE_BINARY
315
316#if _QX_SERIALIZE_WIDE_BINARY
317 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::binary_wiarchive, boost::archive::binary_woarchive)
318#endif // _QX_SERIALIZE_WIDE_BINARY
319
320#if _QX_SERIALIZE_WIDE_TEXT
321 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::text_wiarchive, boost::archive::text_woarchive)
322#endif // _QX_SERIALIZE_WIDE_TEXT
323
324#if _QX_SERIALIZE_WIDE_XML
325 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::xml_wiarchive, boost::archive::xml_woarchive)
326#endif // _QX_SERIALIZE_WIDE_XML
327
328#endif // _QX_ENABLE_BOOST_SERIALIZATION
329
330private:
331
332#ifdef _QX_ENABLE_BOOST_SERIALIZATION
333 template <class Archive>
334 void serialize(Archive & ar, const unsigned int version);
335#endif // _QX_ENABLE_BOOST_SERIALIZATION
336
337};
338
339typedef std::shared_ptr<IxDataMember> IxDataMember_ptr;
340
366
367} // namespace qx
368
371
372#endif // _IX_DATA_MEMBER_H_
QX_DLL_EXPORT_INLINE_FCT bool operator<(const qx::IxDataMember &i1, const qx::IxDataMember &i2)
QX_DLL_EXPORT_INLINE_FCT bool operator>(const qx::IxDataMember &i1, const qx::IxDataMember &i2)
#define QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(ArchiveInput, ArchiveOutput)
qx::any : basic implementation of boost::any (written by Kevlin Henney) when boost dependency is not ...
qx_bool : QxOrm library boolean type with code and description message when an error occured
qx::QxBool qx_bool
Definition QxBool.h:150
QxOrm thread-safe container (keep insertion order + quick access by index + quick access by key)
qx::cvt : namespace to provide global functions to convert any kind of objects to/from QString and QV...
#define QX_DLL_EXPORT
Definition QxMacro.h:182
#define QX_DLL_EXPORT_INLINE_FCT
Definition QxMacro.h:206
Used by introspection engine (IxClass, IxDataMember, IxFunction, etc.) to add meta-data (property bag...
Portable binary input archive using little endian format.
Portable binary output archive using little endian format.
qx::IxDataMember : common interface for all class properties registered into QxOrm context
bool getReadOnly() const
bool hasSqlRelation() const
qx::any getValueAnyPtr(void *pOwner)
QString getTypeParent() const
void customGetSqlName(type_fct_sql_callback fct)
virtual qx_bool fromJson(void *pOwner, const QJsonValue &j, const QString &sFormat)=0
QString getNameParent() const
QVariant toVariant(const void *pOwner, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const
QString getSqlTablePointNameAsAlias(const QString &sTable, const QString &sSep=QString(", "), const QString &sSuffixAlias=QString(), bool bCheckFKPartOfPK=false, const QString &sCustomAlias=QString(), qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
void setVersion(long l)
void setSqlRelation(IxSqlRelation *p)
void setMaxValue(long lMaxValue, const QString &sMessage=QString())
void customGetSqlNameEqualToPlaceHolder(type_fct_sql_callback fct)
bool getIsPrimaryKey() const
friend class QxDataMember
bool getIsUnique() const
virtual void * getDataVoidPtr(void *pOwner)=0
virtual void * getDataVoidPtr(const void *pOwner) const =0
T getValue(void *pOwner, bool *bOk=NULL)
static QString getSqlColumnNameAlias(const QString &sColumn)
QString getKey() const
virtual QString getType() const
void customGetSqlAlias(type_fct_sql_callback fct)
virtual ~IxDataMember()=0
std::function< void(IxDataMemberSqlCallbackParams &)> type_fct_sql_callback
void setAutoIncrement(bool b)
void setRequired(bool b)
void setFormat(const QString &s)
QString getSqlTypeAndParams(int iIndexName=-1) const
IxDataMember(const QString &sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember *pImpl)
bool getIsIndex() const
void setRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation *pRelation, int iIndexNameFK)
void setDao(bool b)
void setMinLength(int iMinLength, const QString &sMessage=QString())
bool getDao() const
void serialize(Archive &ar, const unsigned int version)
void setIsIndex(bool b)
QString getSqlPlaceHolder(const QString &sAppend=QString(), int iIndexName=0, const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const
void setParent(IxDataMemberX *p)
int getPrecision() const
bool isPartOfPrimaryKey(int iIndexNameFK, IxDataMember *&pPrimaryKey, int &iIndexNamePK) const
void setIsPrimaryKey(bool b)
static QString getSqlColumnName(const QString &sColumn)
const char * getNamePtr() const
bool getAutoIncrement() const
void setNotNull(bool bNotNull, const QString &sMessage=QString())
virtual QJsonValue toJson(const void *pOwner, const QString &sFormat) const =0
void setMaxLength(int iMaxLength, const QString &sMessage=QString())
QString getSqlNameAndTypeAndParams(const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const
bool getSerialize() const
static QString getSqlTableNameAlias(const QString &sTable)
void setSqlType(const QString &s)
virtual bool isEqual(const void *pOwner1, const void *pOwner2) const =0
QString getFormat() const
bool getNotNull() const
QString getSqlNameEqualToPlaceHolder(const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
int getMaxLength() const
void setPrecision(int i)
QJsonValue toJson(const void *pOwner) const
void setReadOnly(bool b)
virtual qx::any getDataPtr(void *pOwner)=0
qx_bool fromVariant(void *pOwner, const QVariant &v, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
QString getName() const
bool getAccessDataPointer() const
bool getRequired() const
virtual qx::any getDataPtr(const void *pOwner) const =0
void * getValueVoidPtr(void *pOwner)
static QString getSqlTableName(const QString &sTable)
long getVersion() const
void setName(const QString &s)
QString getName(int iIndex, const QString &sOtherName=QString()) const
QString getDescription() const
bool setValue(void *pOwner, const T &val)
IxDataMember * getPImpl() const
qx_bool fromJson(void *pOwner, const QJsonValue &j)
IxDataMemberX * getParent() const
QVariant getMaxValue() const
std::unique_ptr< IxDataMemberImpl > m_pImpl
Private implementation idiom.
T * getValuePtr(void *pOwner, bool *bOk=NULL)
void customGetSqlAliasEqualToPlaceHolder(type_fct_sql_callback fct)
virtual qx_bool fromVariant(void *pOwner, const QVariant &v, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)=0
void setIsUnique(bool b)
QString getSqlAliasEqualToPlaceHolder(const QString &sTable=QString(), bool bClauseWhere=false, const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
QString getSqlAlias(const QString &sTable=QString(), bool bClauseWhere=false, int iIndexName=0, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
void setMaxValue(double dMaxValue, const QString &sMessage=QString())
void setPartOfPrimaryKey(int iIndexNameFK, IxDataMember *pPrimaryKey, int iIndexNamePK)
void setSqlPlaceHolder(QSqlQuery &query, void *pOwner, const QString &sAppend=QString(), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::QxCollection< QString, QVariantList > *pLstExecBatch=NULL) const
void * getValueVoidPtr(const void *pOwner) const
QString getSqlType(int iIndexName=-1) const
void setAccessDataPointer(bool b)
void setDefaultValue(const QVariant &v)
QString getSqlName(const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
void setSqlAlias(const QString &s)
static QMutex m_mutex
Mutex => qx::IxDataMember is thread-safe.
void setDescription(const QString &s)
IxSqlRelation * getSqlRelation() const
void setMinValue(double dMinValue, const QString &sMessage=QString())
bool isThereRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation *&pRelation, int &iIndexNameFK) const
QVariant getMinValue() const
static QString getSqlFromTable(const QString &sTable, const QString &sCustomAlias=QString())
virtual QVariant toVariant(const void *pOwner, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const =0
int getNameCount() const
void setNameParent(const QString &s)
void customGetSqlTablePointNameAsAlias(type_fct_sql_callback fct)
qx::any getValueAnyPtr(const void *pOwner) const
void setSerialize(bool b)
QVariant getDefaultValue() const
int getMinLength() const
void setMinValue(long lMinValue, const QString &sMessage=QString())
qx::IxDataMemberX : common interface for a list of IxDataMember class properties registered into QxOr...
qx::IxSqlQueryBuilder : common interface to build SQL queries to communicate with database
qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 ta...
bool getValue() const
Definition QxBool.h:95
qx::QxCollection<Key, Value> : QxOrm thread-safe container (keep insertion order + quick access by in...
qx::QxPropertyBag : used by introspection engine (IxClass, IxDataMember, IxFunction,...
qx::dao::detail::IxDao_Helper : helper class to communicate with database
Root namespace for all QxOrm library features.
ValueType * any_cast(any *)
Definition QxAny.h:133
std::shared_ptr< IxDataMember > IxDataMember_ptr
static bool setValue(IxDataMember *pData, void *pOwner, const QString &val)
static QVariant getValue(IxDataMember *pData, void *pOwner, bool *bOk)
static bool setValue(IxDataMember *pData, void *pOwner, const T &val)
static bool setValue(IxDataMember *pData, void *pOwner, const QVariant &val)
static QString getValue(IxDataMember *pData, void *pOwner, bool *bOk)
static T getValue(IxDataMember *pData, void *pOwner, bool *bOk)
qx::IxDataMemberSqlCallbackParams : list of parameters used by custom callback functions to override ...
QString sCustomAlias
SQL custom alias (not always provided)
IxDataMemberSqlCallbackParams(const IxDataMember *p, QString &sql)
bool bCheckFKPartOfPK
Check if foreign key is part of primary key (not always provided)
QString sAppend
String to append to SQL query (not always provided)
QString sSep
SQL separator (not always provided)
int iIndexName
Index name for composite primary key (not always provided)
qx::dao::detail::IxDao_Helper * pDaoHelper
DAO helper instance.
qx::IxSqlQueryBuilder * pSqlQueryBuilder
SQL query builder instance.
QString sSuffixAlias
SQL suffix alias (not always provided)
bool bClauseWhere
Define if we are building SQL in the clause WHERE or not (not always provided)
QString & sSQL
Default value is the SQL generated by QxOrm library for this data member, can be changed by the custo...
QString sOtherName
SQL other name for this data member (not always provided)
const IxDataMember * pDataMember
The data member instance which calls custom callback function.
QString sTable
SQL table name (not always provided)