diff options
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/storage.h b/common/storage.h index d1dda3e..42cdcac 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -25,10 +25,16 @@ | |||
25 | #include <string> | 25 | #include <string> |
26 | #include <functional> | 26 | #include <functional> |
27 | #include <QString> | 27 | #include <QString> |
28 | #include <QMap> | ||
28 | 29 | ||
29 | namespace Sink { | 30 | namespace Sink { |
30 | namespace Storage { | 31 | namespace Storage { |
31 | 32 | ||
33 | struct DbLayout { | ||
34 | QByteArray name; | ||
35 | QMap<QByteArray, int> tables; | ||
36 | }; | ||
37 | |||
32 | class SINK_EXPORT DataStore | 38 | class SINK_EXPORT DataStore |
33 | { | 39 | { |
34 | public: | 40 | public: |
@@ -151,6 +157,7 @@ public: | |||
151 | }; | 157 | }; |
152 | 158 | ||
153 | DataStore(const QString &storageRoot, const QString &name, AccessMode mode = ReadOnly); | 159 | DataStore(const QString &storageRoot, const QString &name, AccessMode mode = ReadOnly); |
160 | DataStore(const QString &storageRoot, const DbLayout &layout, AccessMode mode = ReadOnly); | ||
154 | ~DataStore(); | 161 | ~DataStore(); |
155 | 162 | ||
156 | Transaction createTransaction(AccessMode mode = ReadWrite, const std::function<void(const DataStore::Error &error)> &errorHandler = std::function<void(const DataStore::Error &error)>()); | 163 | Transaction createTransaction(AccessMode mode = ReadWrite, const std::function<void(const DataStore::Error &error)> &errorHandler = std::function<void(const DataStore::Error &error)>()); |