summaryrefslogtreecommitdiffstats
path: root/common/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage.h')
-rw-r--r--common/storage.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/storage.h b/common/storage.h
index d186b2e..98b12ed 100644
--- a/common/storage.h
+++ b/common/storage.h
@@ -76,9 +76,13 @@ public:
76 * 76 *
77 * @return The number of values retrieved. 77 * @return The number of values retrieved.
78 */ 78 */
79 int scan(const QByteArray &k, 79 int scan(const QByteArray &key,
80 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler, 80 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler,
81 const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()) const; 81 const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>(), bool findSubstringKeys = false) const;
82
83 void findLatest(const QByteArray &uid,
84 const std::function<void(const QByteArray &key, const QByteArray &value)> &resultHandler,
85 const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()) const;
82 86
83 NamedDatabase(NamedDatabase&& other) : d(other.d) 87 NamedDatabase(NamedDatabase&& other) : d(other.d)
84 { 88 {
@@ -170,6 +174,9 @@ public:
170 static bool isInternalKey(void *key, int keySize); 174 static bool isInternalKey(void *key, int keySize);
171 static bool isInternalKey(const QByteArray &key); 175 static bool isInternalKey(const QByteArray &key);
172 176
177 static QByteArray assembleKey(const QByteArray &key, qint64 revision);
178 static QByteArray uidFromKey(const QByteArray &key);
179
173private: 180private:
174 std::function<void(const Storage::Error &error)> mErrorHandler; 181 std::function<void(const Storage::Error &error)> mErrorHandler;
175 182