QxOrm 1.4.9
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
46#ifdef _MSC_VER
47#pragma warning(push)
48#pragma warning(disable:4996)
49#endif // _MSC_VER
50
51#include <QtSql/qsqlquery.h>
52
53#ifndef _QX_NO_JSON
54#include <QtCore/qjsonvalue.h>
55#endif // _QX_NO_JSON
56
57#include <QxCommon/QxAny.h>
58#include <QxCommon/QxBool.h>
60
62
64
65#include <QxConvert/QxConvert.h>
66
67#ifdef _MSC_VER
68#pragma warning(pop)
69#endif // _MSC_VER
70
71#define QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(ArchiveInput, ArchiveOutput) \
72virtual void toArchive(const void * pOwner, ArchiveOutput & ar) const = 0; \
73virtual void fromArchive(void * pOwner, ArchiveInput & ar) = 0;
74
75namespace qx {
76
77class IxDataMemberX;
78class IxSqlRelation;
79class IxSqlQueryBuilder;
80struct IxDataMemberSqlCallbackParams;
81
82namespace dao {
83namespace detail {
84
85class IxDao_Helper;
86
87} // namespace detail
88} // namespace dao
89
95{
96
97 template <typename DataType, class Owner>
98 friend class QxDataMember;
99
100public:
101
103
104private:
105
106 struct IxDataMemberImpl;
107 std::unique_ptr<IxDataMemberImpl> m_pImpl;
108
109public:
110
111 IxDataMember(const QString & sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember * pImpl);
112 virtual ~IxDataMember() = 0;
113
114 QString getKey() const;
115 QString getName() const;
116 int getNameCount() const;
117 QString getNameParent() const;
118 const char * getNamePtr() const;
119 QString getDescription() const;
120 QString getFormat() const;
121 long getVersion() const;
122 bool getSerialize() const;
123 bool getDao() const;
124 QVariant getDefaultValue() const;
125 QVariant getMinValue() const;
126 QVariant getMaxValue() const;
127 int getPrecision() const;
128 int getMinLength() const;
129 int getMaxLength() const;
130 bool getRequired() const;
131 bool getReadOnly() const;
132 bool getAutoIncrement() const;
133 bool getNotNull() const;
134 bool getIsPrimaryKey() const;
135 bool getIsIndex() const;
136 bool getIsUnique() const;
139 bool hasSqlRelation() const;
141 virtual QString getType() const;
142 QString getTypeParent() const;
144
145 void setName(const QString & s);
146 void setNameParent(const QString & s);
147 void setDescription(const QString & s);
148 void setFormat(const QString & s);
149 void setSqlType(const QString & s);
150 void setSqlAlias(const QString & s);
151 void setVersion(long l);
152 void setSerialize(bool b);
153 void setDao(bool b);
154 void setDefaultValue(const QVariant & v);
155 void setPrecision(int i);
156 void setRequired(bool b);
157 void setReadOnly(bool b);
158 void setAutoIncrement(bool b);
159 void setIsPrimaryKey(bool b);
160 void setIsIndex(bool b);
161 void setIsUnique(bool b);
165
166 void setMinValue(long lMinValue, const QString & sMessage = QString());
167 void setMinValue(double dMinValue, const QString & sMessage = QString());
168 void setMaxValue(long lMaxValue, const QString & sMessage = QString());
169 void setMaxValue(double dMaxValue, const QString & sMessage = QString());
170 void setMinLength(int iMinLength, const QString & sMessage = QString());
171 void setMaxLength(int iMaxLength, const QString & sMessage = QString());
172 void setNotNull(bool bNotNull, const QString & sMessage = QString());
173
174 bool isThereRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation * & pRelation, int & iIndexNameFK) const;
175 bool isPartOfPrimaryKey(int iIndexNameFK, IxDataMember * & pPrimaryKey, int & iIndexNamePK) const;
176 void setRelationPartOfPrimaryKey(int iIndexNamePK, IxSqlRelation * pRelation, int iIndexNameFK);
177 void setPartOfPrimaryKey(int iIndexNameFK, IxDataMember * pPrimaryKey, int iIndexNamePK);
178
179 QString getName(int iIndex, const QString & sOtherName = QString()) const;
180 QString getSqlAlias(const QString & sTable = QString(), bool bClauseWhere = false, int iIndexName = 0, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
181 QString getSqlType(int iIndexName = -1) const;
182 QString getSqlTypeAndParams(int iIndexName = -1) const;
183 QString getSqlPlaceHolder(const QString & sAppend = QString(), int iIndexName = 0, const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false) const;
184 void setSqlPlaceHolder(QSqlQuery & query, void * pOwner, const QString & sAppend = QString(), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false, qx::QxCollection<QString, QVariantList> * pLstExecBatch = NULL) const;
185 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;
186 QString getSqlNameEqualToPlaceHolder(const QString & sAppend = QString(), const QString & sSep = QString(" AND "), bool bCheckFKPartOfPK = false, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
187 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;
188 QString getSqlName(const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false, qx::IxSqlQueryBuilder * pSqlQueryBuilder = NULL) const;
189 QString getSqlNameAndTypeAndParams(const QString & sSep = QString(", "), const QString & sOtherName = QString(), bool bCheckFKPartOfPK = false) const;
190
196
197 static QString getSqlFromTable(const QString & sTable, const QString & sCustomAlias = QString());
198 static QString getSqlTableName(const QString & sTable);
199 static QString getSqlColumnName(const QString & sColumn);
200 static QString getSqlTableNameAlias(const QString & sTable);
201 static QString getSqlColumnNameAlias(const QString & sColumn);
202
203 virtual bool isEqual(const void * pOwner1, const void * pOwner2) const = 0;
204 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;
205 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;
206
207 QVariant toVariant(const void * pOwner, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context) const;
208 qx_bool fromVariant(void * pOwner, const QVariant & v, int iIndexName = -1, qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context);
209
210#ifndef _QX_NO_JSON
211 virtual QJsonValue toJson(const void * pOwner, const QString & sFormat) const = 0;
212 virtual qx_bool fromJson(void * pOwner, const QJsonValue & j, const QString & sFormat) = 0;
213
214 QJsonValue toJson(const void * pOwner) const;
215 qx_bool fromJson(void * pOwner, const QJsonValue & j);
216#endif // _QX_NO_JSON
217
218protected:
219
220 virtual qx::any getDataPtr(const void * pOwner) const = 0;
221 virtual qx::any getDataPtr(void * pOwner) = 0;
222 virtual void * getDataVoidPtr(const void * pOwner) const = 0;
223 virtual void * getDataVoidPtr(void * pOwner) = 0;
224
225public:
226
227 qx::any getValueAnyPtr(const void * pOwner) const { return this->getDataPtr(pOwner); }
228 qx::any getValueAnyPtr(void * pOwner) { return this->getDataPtr(pOwner); }
229 void * getValueVoidPtr(const void * pOwner) const { return this->getDataVoidPtr(pOwner); }
230 void * getValueVoidPtr(void * pOwner) { return this->getDataVoidPtr(pOwner); }
231
232 template <typename T>
233 T * getValuePtr(void * pOwner, bool * bOk = NULL)
234 {
235 if (bOk) { (* bOk) = false; }
236 if (! getAccessDataPointer()) { qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "cannot access data-member pointer"); return NULL; }
237 qx::any a = this->getDataPtr(pOwner);
238 try { T * t = qx::any_cast<T *>(a); if (bOk) { (* bOk) = (t != NULL); }; return t; }
239 catch (const qx::bad_any_cast & err) { Q_UNUSED(err); qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "bad any cast exception"); return NULL; }
240 catch (...) { qDebug("[QxOrm] qx::IxDataMember::getValuePtr<T>() : '%s'", "unknown cast exception"); return NULL; }
241 }
242
243 template <typename T>
244 T getValue(void * pOwner, bool * bOk = NULL)
245 {
246 if (! getAccessDataPointer()) { return qxCannotAccessDataPointer<T, 0>::getValue(this, pOwner, bOk); }
247 T * t = this->getValuePtr<T>(pOwner, bOk);
248 return (t ? (* t) : T());
249 }
250
251 template <typename T>
252 bool setValue(void * pOwner, const T & val)
253 {
254 if (! getAccessDataPointer()) { return qxCannotAccessDataPointer<T, 0>::setValue(this, pOwner, val); }
255 T * t = this->getValuePtr<T>(pOwner);
256 if (t) { (* t) = val; }
257 return (t != NULL);
258 }
259
260private:
261
262 template <typename T, int dummy>
264 {
265 static T getValue(IxDataMember * pData, void * pOwner, bool * bOk)
266 { Q_UNUSED(pData); Q_UNUSED(pOwner); qDebug("[QxOrm] qx::IxDataMember::qxCannotAccessDataPointer<T>::getValue() : '%s'", "type T not supported"); if (bOk) { (* bOk) = false; }; return T(); }
267 static bool setValue(IxDataMember * pData, void * pOwner, const T & val)
268 { Q_UNUSED(pData); Q_UNUSED(pOwner); Q_UNUSED(val); qDebug("[QxOrm] qx::IxDataMember::qxCannotAccessDataPointer<T>::setValue() : '%s'", "type T not supported"); return false; }
269 };
270
271 template <int dummy>
272 struct qxCannotAccessDataPointer<QVariant, dummy>
273 {
274 static QVariant getValue(IxDataMember * pData, void * pOwner, bool * bOk)
275 { if (bOk) { (* bOk) = (pData != NULL); }; return (pData ? pData->toVariant(pOwner, "") : QVariant()); }
276 static bool setValue(IxDataMember * pData, void * pOwner, const QVariant & val)
277 { return (pData ? pData->fromVariant(pOwner, val, "").getValue() : false); }
278 };
279
280 template <int dummy>
281 struct qxCannotAccessDataPointer<QString, dummy>
282 {
283 static QString getValue(IxDataMember * pData, void * pOwner, bool * bOk)
284 { if (bOk) { (* bOk) = (pData != NULL); }; return (pData ? pData->toVariant(pOwner, "").toString() : QString()); }
285 static bool setValue(IxDataMember * pData, void * pOwner, const QString & val)
286 { QVariant tmp(val); return (pData ? pData->fromVariant(pOwner, tmp, "").getValue() : false); }
287 };
288
289public:
290
291#ifdef _QX_ENABLE_BOOST_SERIALIZATION
292
293#if _QX_SERIALIZE_POLYMORPHIC
294 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::polymorphic_iarchive, boost::archive::polymorphic_oarchive)
295#endif // _QX_SERIALIZE_POLYMORPHIC
296
297#if _QX_SERIALIZE_BINARY
298 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::binary_iarchive, boost::archive::binary_oarchive)
299#endif // _QX_SERIALIZE_BINARY
300
301#if _QX_SERIALIZE_TEXT
302 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::text_iarchive, boost::archive::text_oarchive)
303#endif // _QX_SERIALIZE_TEXT
304
305#if _QX_SERIALIZE_XML
306 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::xml_iarchive, boost::archive::xml_oarchive)
307#endif // _QX_SERIALIZE_XML
308
309#if _QX_SERIALIZE_PORTABLE_BINARY
311#endif // _QX_SERIALIZE_PORTABLE_BINARY
312
313#if _QX_SERIALIZE_WIDE_BINARY
314 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::binary_wiarchive, boost::archive::binary_woarchive)
315#endif // _QX_SERIALIZE_WIDE_BINARY
316
317#if _QX_SERIALIZE_WIDE_TEXT
318 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::text_wiarchive, boost::archive::text_woarchive)
319#endif // _QX_SERIALIZE_WIDE_TEXT
320
321#if _QX_SERIALIZE_WIDE_XML
322 QX_IX_DATA_MEMBER_PURE_VIRTUAL_ARCHIVE(boost::archive::xml_wiarchive, boost::archive::xml_woarchive)
323#endif // _QX_SERIALIZE_WIDE_XML
324
325#endif // _QX_ENABLE_BOOST_SERIALIZATION
326
327private:
328
329#ifdef _QX_ENABLE_BOOST_SERIALIZATION
330 template <class Archive>
331 void serialize(Archive & ar, const unsigned int version);
332#endif // _QX_ENABLE_BOOST_SERIALIZATION
333
334};
335
336typedef std::shared_ptr<IxDataMember> IxDataMember_ptr;
337
363
364} // namespace qx
365
368
369#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
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
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)
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...
qx_bool : boolean type with code and description message when an error occured
Definition QxBool.h:71
bool getValue() const
Definition QxBool.h:95
qx::QxCollection<Key, Value> : QxOrm thread-safe container (keep insertion order + quick access by in...
qx::QxDataMember<DataType, Owner> : concrete property of type DataType registered into QxOrm context ...
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 QString getValue(IxDataMember *pData, void *pOwner, bool *bOk)
static QVariant getValue(IxDataMember *pData, void *pOwner, bool *bOk)
static bool setValue(IxDataMember *pData, void *pOwner, const QVariant &val)
static bool setValue(IxDataMember *pData, void *pOwner, const T &val)
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)