64 return static_cast<uint
>(type);
103 bool isValid()
const override;
110 bool isHaveAPrimaryKey()
const;
117 virtual void clear();
143 virtual PrepareResult prepareSelectQuery(QSqlQuery& q)
const;
228 virtual PrepareResult prepareInsertQuery(QSqlQuery& q,
bool replace)
const;
288 virtual PrepareResult prepareUpdateQuery(QSqlQuery& q)
const;
299 virtual PrepareResult prepareRemoveQuery(QSqlQuery& q)
const;
312 virtual bool isCached()
const;
320 virtual bool isBundle()
const;
329 QString toString()
const override;
371 QDataStream &fromStream(QDataStream &stream)
override;
372 QDataStream &toStream(QDataStream &stream)
const override;
391 virtual std::pair<QString, QMap<QString, QVariant>> condition()
const;
399 virtual QString primaryKey()
const;
407 virtual QVariant primaryValue()
const;
414 bool isInsertPrimaryKey()
const;
#define QH_PACKAGE(S)
QH_PACKAGE This macross prepare data to send and create a global id for package. For get global id us...
The DbAddress class use to work with database addresses. Database Address it is structure with 2 valu...
The AbstractData class is provide base functions for transport data by network For create you own pac...
The DBObject class- main class for work with data base.
virtual bool fromSqlRecord(const QSqlRecord &q)=0
fromSqlRecord This method should be initialize this object from the executed sqlRecord....
virtual DBObject * createDBObject() const =0
createDBObject This method should be create a object with the some type as the object called this met...
virtual QString table() const =0
table This method should be return name of the database table that should be contains objects with th...
Q_DECLARE_METATYPE(QList< QH::PKG::DBObject * > *)
#define HEARTSHARED_EXPORT
PrepareResult
The PrepareResult enum is result of work prepare sql query of dbobjects.
@ Success
prepare finished successful.
@ Disabled
prepare disabled for method. Use this case for disable prepare method for object without errors.
QMap< QString, DBVariant > DBVariantMap
DBVariantMap this is Map with key, and value with data type.
constexpr uint qHash(MemberType type)
MemberType
The MemberType enum. This enum contains types of members DBObjects classes. for more information see ...
@ Update
The Field With This type can be updated but not inserted.
@ PrimaryKey
The primary key field without autoincrement.
@ PrimaryKeyAutoIncrement
@ None
The Field with this type can not be update and Inserted.
@ Autoincement
The field with this atribute automaticaly incemented into database, and will not to added into insert...
@ InsertUpdate
The Field With This type can be inserted and updated.
@ Insert
The Field With This type can be inserted but not updated.
@ Unique
The Field with this type can not be duplicate on a table. If a Database object do not have a primary ...
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
The DBVariant struct contains QVariant value of the DBObjects member and it type.