Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
sqlitedbcache.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
9
10#ifndef SQLITEDBCACHE_H
11#define SQLITEDBCACHE_H
12
13#ifdef HEART_DB_CACHE
14
15#include "isqldbcache.h"
16
17namespace QH {
18
22class SQLiteDBCachePrivate;
23
24// TO-DO see task https://github.com/QuasarApp/Heart/issues/15
25
40class HEARTSHARED_EXPORT SQLiteDBCache : public ISqlDBCache
41{
42public:
43 SQLiteDBCache();
44 ~SQLiteDBCache();
45 // ISqlDBCache interface
46 bool init(const QVariantMap &params) override;
47
48protected:
49 void deleteFromCache(const QSharedPointer<QH::PKG::DBObject> & delObj) override;
50 bool insertToCache(const QSharedPointer<QH::PKG::DBObject> &obj) override;
51 bool updateCache(const QSharedPointer<QH::PKG::DBObject> &obj) override;
52
53 QList<QSharedPointer<QH::PKG::DBObject>>
54 getFromCache(const QH::PKG::DBObject *obj) override;
55
56private:
57 SQLiteDBCachePrivate * _private = nullptr;
58
59};
60}
61#endif
62
63#endif // SQLITEDBCACHE_H
The DBObject class- main class for work with data base.
Definition dbobject.h:94
#define HEARTSHARED_EXPORT
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13
bool init()
init This method initialize default resources of the Heart Library.
Definition heart.cpp:15