Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
sqldb.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2024 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 SQLDB_H
9#define SQLDB_H
10#include "isqldb.h"
11
12namespace QH {
13
18class HEARTSHARED_EXPORT SqlDB final: public ISqlDB {
19 Q_OBJECT
20public:
21 SqlDB();
22
23 // ISqlDBCache interface
24protected:
25 void deleteFromCache(const QSharedPointer<PKG::DBObject> &delObj) override final;
26 bool insertToCache(const QSharedPointer<PKG::DBObject> &obj) override final;
27 bool updateCache(const QSharedPointer<PKG::DBObject> &obj) override final;
28 QList<QSharedPointer<PKG::DBObject>>
29 getFromCache(const PKG::DBObject *obj) override final;
30 void pushToQueue(const QSharedPointer<PKG::DBObject> &obj, CacheAction type) override final;
31 void globalUpdateDataBasePrivate(qint64 currentTime) override final;
32 void globalUpdateDataBase(SqlDBCasheWriteMode mode) override final;
33};
34}
35#endif // SQLDB_H
The ISqlDB class it is db cache and bridge for DbWriters. Work Scheme of the database cache:
Definition isqldb.h:73
The DBObject class- main class for work with data base.
Definition dbobject.h:94
The SqlDB class This is base implementation fo datatbase. The SqlDB do not use caches,...
Definition sqldb.h:18
#define HEARTSHARED_EXPORT
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13
SqlDBCasheWriteMode
The SqlDBCasheWriteMode enum contains list of available modes of write data into database.
Definition isqldb.h:29
CacheAction
The CacheAction enum contains types of database cache actions. The any database caches save all chang...
Definition isqldb.h:44