Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
setsinglevalue.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 SETSINGLEVALUE_H
9
#define SETSINGLEVALUE_H
10
11
#include "
dbobject.h
"
12
13
namespace
QH
{
14
15
16
namespace
PKG
{
17
33
class
HEARTSHARED_EXPORT
SetSingleValue
final:
public
DBObject
34
{
35
public
:
43
SetSingleValue
(
const
DbAddress
& address,
44
const
QString& field,
45
const
QVariant& value,
46
const
QString&
primaryKey
=
"id"
);
47
48
DBObject
*
createDBObject
()
const override
;
49
PrepareResult
prepareUpdateQuery
(QSqlQuery &q)
const override
;
50
PrepareResult
prepareInsertQuery
(QSqlQuery &q,
bool
replace)
const override
;
51
52
bool
fromSqlRecord
(
const
QSqlRecord &q)
override
;
53
bool
isCached
()
const override
;
54
55
QString
table
()
const override
;
56
57
58
protected
:
59
QString
primaryKey
()
const override
;
60
QVariant
primaryValue
()
const override
;
61
62
private
:
63
QString _primaryKey;
64
QVariant _primaryValue;
65
QString _table;
66
QVariant _value;
67
QString _field;
68
};
69
70
}
71
}
72
#endif
// SETSINGLEVALUE_H
QH::DbAddress
The DbAddress class use to work with database addresses. Database Address it is structure with 2 valu...
Definition
dbaddress.h:24
QH::PKG::DBObject::DBObject
DBObject()
Definition
dbobject.cpp:22
QH::PKG::SetSingleValue::primaryValue
QVariant primaryValue() const override
primaryValue This method is wraper of DBAddress::id. If This object do not contains a id value then r...
Definition
setsinglevalue.cpp:87
QH::PKG::SetSingleValue::table
QString table() const override
table This method should be return name of the database table that should be contains objects with th...
Definition
setsinglevalue.cpp:79
QH::PKG::SetSingleValue::createDBObject
DBObject * createDBObject() const override
createDBObject This method should be create a object with the some type as the object called this met...
Definition
setsinglevalue.cpp:30
QH::PKG::SetSingleValue::isCached
bool isCached() const override
isCached This method sholud be return status of object. If this method return true then this object c...
Definition
setsinglevalue.cpp:75
QH::PKG::SetSingleValue::SetSingleValue
SetSingleValue(const DbAddress &address, const QString &field, const QVariant &value, const QString &primaryKey="id")
SetSingleValue This is default constructor of the update query generator.
Definition
setsinglevalue.cpp:19
QH::PKG::SetSingleValue::fromSqlRecord
bool fromSqlRecord(const QSqlRecord &q) override
fromSqlRecord This method should be initialize this object from the executed sqlRecord....
Definition
setsinglevalue.cpp:71
QH::PKG::SetSingleValue::primaryKey
QString primaryKey() const override
primaryKey This method must be return the name of primary key of this object table....
Definition
setsinglevalue.cpp:83
QH::PKG::SetSingleValue::prepareUpdateQuery
PrepareResult prepareUpdateQuery(QSqlQuery &q) const override
prepareUpdateQuery this method should be prepare a insert data query.
Definition
setsinglevalue.cpp:34
QH::PKG::SetSingleValue::prepareInsertQuery
PrepareResult prepareInsertQuery(QSqlQuery &q, bool replace) const override
prepareInsertQuery This method should be prepare a query for insert object into database....
Definition
setsinglevalue.cpp:51
dbobject.h
QH::PKG
The PKG namesapce - this namespace contains all default packages of the Heart library....
Definition
heart.h:211
QH::PKG::PrepareResult
PrepareResult
The PrepareResult enum is result of work prepare sql query of dbobjects.
Definition
dbobject.h:24
QH
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition
heart.cpp:13
src
public
packages
setsinglevalue.h
Generated by
1.18.0