Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Loading...
Searching...
No Matches
dbobjectset.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef DBOBJECTSET_H
9#define DBOBJECTSET_H
10
11#include "dbobject.h"
12
13
14namespace QH {
15namespace PKG {
16
23class HEARTSHARED_EXPORT DBObjectSet: public DBObject
24{
25 QH_PACKAGE("DBObjectSet")
26
27public:
28 DBObjectSet(const QString table);
29
30 PrepareResult prepareInsertQuery(QSqlQuery &q, bool replace) const override final;
31 PrepareResult prepareRemoveQuery(QSqlQuery &q) const override final;
32 PrepareResult prepareSelectQuery(QSqlQuery &q) const override final;
33 PrepareResult prepareUpdateQuery(QSqlQuery &q) const override final;
34
35 bool isCached() const override final;
36 bool isBundle() const override final;
37 QString primaryKey() const override;
38 QString table() const override;
39
40private:
41 QString _table;
42
43};
44}
45}
46#endif // DBOBJECTSET_H
#define QH_PACKAGE(S)
QH_PACKAGE This macross prepare data to send and create a global id for package. For get global id us...
PrepareResult prepareUpdateQuery(QSqlQuery &q) const override final
prepareUpdateQuery this method should be prepare a insert data query.
DBObjectSet(const QString table)
bool isCached() const override final
isCached This method sholud be return status of object. If this method return true then this object c...
PrepareResult prepareInsertQuery(QSqlQuery &q, bool replace) const override final
prepareInsertQuery This method should be prepare a query for insert object into database....
bool isBundle() const override final
isBundle This method definef determines whether the object will be abstract (composite objects) or si...
QString table() const override
table This method should be return name of the database table that should be contains objects with th...
QString primaryKey() const override
primaryKey This method must be return the name of primary key of this object table....
PrepareResult prepareSelectQuery(QSqlQuery &q) const override final
prepareSelectQuery This method should be prepare a query for selected data. Override this method for ...
PrepareResult prepareRemoveQuery(QSqlQuery &q) const override final
prepareRemoveQuery This method should be prepare a query for remove this object from a database....
The PKG namesapce - this namespace contains all default packages of the Heart library....
Definition heart.h:211
PrepareResult
The PrepareResult enum is result of work prepare sql query of dbobjects.
Definition dbobject.h:24
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13