Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
dbpatch.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 DBPATCH_H
9#define DBPATCH_H
10
11#include "iobjectprovider.h"
12
13
14namespace QH {
15
16
25struct DBPatch {
28 unsigned short versionFrom = 0;
29
32 unsigned short versionTo = 0;
33
35 std::function<bool (QH::iObjectProvider *)> action;
36
41 bool isValid() const;
42};
43
49typedef QMap<unsigned short, QMap<unsigned short, DBPatch>> DBPatchMap;
50}
51#endif // DBPATCH_H
The iObjectProvider class is base interface for work with database objects. Using on database writers...
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13
QMap< unsigned short, QMap< unsigned short, DBPatch > > DBPatchMap
DBPatchMap This is 2 depch map of the DBPatch structure when the first key it is version (from) and s...
Definition dbpatch.h:49
DBPatch This is function that should be upgrade database.
Definition dbpatch.h:25
unsigned short versionFrom
Definition dbpatch.h:28
std::function< bool(QH::iObjectProvider *)> action
This is lymbda function with action that will upgrade data base to new versio.
Definition dbpatch.h:35
bool isValid() const
isValid This method check this oject to valid.
Definition dbpatch.cpp:12
unsigned short versionTo
Definition dbpatch.h:32