Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
sqldb.cpp
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
#include "
sqldb.h
"
9
namespace
QH
{
10
11
SqlDB::SqlDB
():
12
ISqlDB
(0,
SqlDBCasheWriteMode
::
Force
) {
13
}
14
15
void
SqlDB::deleteFromCache
(
const
QSharedPointer<PKG::DBObject> &delObj) {
16
Q_UNUSED(delObj);
17
}
18
19
bool
SqlDB::insertToCache
(
const
QSharedPointer<PKG::DBObject> &obj) {
20
Q_UNUSED(obj);
21
return
false
;
22
}
23
24
bool
SqlDB::updateCache
(
const
QSharedPointer<PKG::DBObject> &obj) {
25
Q_UNUSED(obj);
26
return
false
;
27
}
28
29
QList<QSharedPointer<PKG::DBObject>>
30
SqlDB::getFromCache
(
const
PKG::DBObject
*obj) {
31
Q_UNUSED(obj);
32
return
{};
33
}
34
35
void
SqlDB::pushToQueue
(
const
QSharedPointer<PKG::DBObject> &obj,
36
CacheAction
type) {
37
Q_UNUSED(obj);
38
Q_UNUSED(type);
39
}
40
41
void
SqlDB::globalUpdateDataBasePrivate
(qint64 currentTime) {
42
Q_UNUSED(currentTime);
43
}
44
45
void
SqlDB::globalUpdateDataBase
(
SqlDBCasheWriteMode
mode) {
46
Q_UNUSED(mode);
47
}
48
}
QH::ISqlDB::ISqlDB
ISqlDB(qint64 updateInterval=DEFAULT_UPDATE_INTERVAL, SqlDBCasheWriteMode mode=SqlDBCasheWriteMode::Default)
ISqlDB This is default constructor of dbcache.
Definition
isqldb.cpp:139
QH::PKG::DBObject
The DBObject class- main class for work with data base.
Definition
dbobject.h:94
QH::SqlDB::insertToCache
bool insertToCache(const QSharedPointer< PKG::DBObject > &obj) override final
Definition
sqldb.cpp:19
QH::SqlDB::globalUpdateDataBasePrivate
void globalUpdateDataBasePrivate(qint64 currentTime) override final
globalUpdateDataBasePrivate This method update(write) all data from cache into database....
Definition
sqldb.cpp:41
QH::SqlDB::globalUpdateDataBase
void globalUpdateDataBase(SqlDBCasheWriteMode mode) override final
globalUpdateDataBase This is base method for syncing data from the cache with database.
Definition
sqldb.cpp:45
QH::SqlDB::pushToQueue
void pushToQueue(const QSharedPointer< PKG::DBObject > &obj, CacheAction type) override final
Definition
sqldb.cpp:35
QH::SqlDB::getFromCache
QList< QSharedPointer< PKG::DBObject > > getFromCache(const PKG::DBObject *obj) override final
getFromCache This method return strong pointer to the database object from cache (pool).
Definition
sqldb.cpp:30
QH::SqlDB::deleteFromCache
void deleteFromCache(const QSharedPointer< PKG::DBObject > &delObj) override final
Definition
sqldb.cpp:15
QH::SqlDB::updateCache
bool updateCache(const QSharedPointer< PKG::DBObject > &obj) override final
Definition
sqldb.cpp:24
QH::SqlDB::SqlDB
SqlDB()
Definition
sqldb.cpp:11
QH
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition
heart.cpp:13
QH::SqlDBCasheWriteMode
SqlDBCasheWriteMode
The SqlDBCasheWriteMode enum contains list of available modes of write data into database.
Definition
isqldb.h:29
QH::SqlDBCasheWriteMode::Force
@ Force
This mode writes all changes to the database as soon as they come to the cache.
Definition
isqldb.h:35
QH::CacheAction
CacheAction
The CacheAction enum contains types of database cache actions. The any database caches save all chang...
Definition
isqldb.h:44
sqldb.h
src
public
sqldb.cpp
Generated by
1.18.0