diff options
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/storage.h b/common/storage.h index fd349f3..71e9401 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -128,14 +128,14 @@ public: | |||
128 | public: | 128 | public: |
129 | Transaction(); | 129 | Transaction(); |
130 | ~Transaction(); | 130 | ~Transaction(); |
131 | bool commit(const std::function<void(const DataStore::Error &error)> &errorHandler = std::function<void(const DataStore::Error &error)>()); | 131 | bool commit(const std::function<void(const DataStore::Error &error)> &errorHandler = {}); |
132 | void abort(); | 132 | void abort(); |
133 | 133 | ||
134 | QList<QByteArray> getDatabaseNames() const; | 134 | QList<QByteArray> getDatabaseNames() const; |
135 | bool validateNamedDatabases(); | 135 | bool validateNamedDatabases(); |
136 | 136 | ||
137 | NamedDatabase openDatabase(const QByteArray &name = QByteArray("default"), | 137 | NamedDatabase openDatabase(const QByteArray &name = {"default"}, |
138 | const std::function<void(const DataStore::Error &error)> &errorHandler = std::function<void(const DataStore::Error &error)>(), bool allowDuplicates = false) const; | 138 | const std::function<void(const DataStore::Error &error)> &errorHandler = {}, bool allowDuplicates = false) const; |
139 | 139 | ||
140 | Transaction(Transaction &&other); | 140 | Transaction(Transaction &&other); |
141 | Transaction &operator=(Transaction &&other); | 141 | Transaction &operator=(Transaction &&other); |
@@ -189,6 +189,9 @@ public: | |||
189 | static QByteArray getTypeFromRevision(const Transaction &, qint64 revision); | 189 | static QByteArray getTypeFromRevision(const Transaction &, qint64 revision); |
190 | static void recordRevision(Transaction &, qint64 revision, const QByteArray &uid, const QByteArray &type); | 190 | static void recordRevision(Transaction &, qint64 revision, const QByteArray &uid, const QByteArray &type); |
191 | static void removeRevision(Transaction &, qint64 revision); | 191 | static void removeRevision(Transaction &, qint64 revision); |
192 | static void recordUid(DataStore::Transaction &transaction, const QByteArray &uid); | ||
193 | static void removeUid(DataStore::Transaction &transaction, const QByteArray &uid); | ||
194 | static void getUids(const Transaction &, const std::function<void(const QByteArray &uid)> &); | ||
192 | 195 | ||
193 | bool exists() const; | 196 | bool exists() const; |
194 | 197 | ||