diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-12 11:45:24 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-12 11:45:24 +0100 |
commit | 63b056d69f3063a8a564b38c1890ae65afaddc2c (patch) | |
tree | 742570fc2b7bcbde8c0c301c881bd97f260d9520 /common/storage.h | |
parent | 466c60dcef3b593f04e51bae843366fbf6ce697b (diff) | |
download | sink-63b056d69f3063a8a564b38c1890ae65afaddc2c.tar.gz sink-63b056d69f3063a8a564b38c1890ae65afaddc2c.zip |
Sequential keys go badly with findLatest
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/storage.h b/common/storage.h index ac03947..663d192 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -86,6 +86,12 @@ public: | |||
86 | const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler, | 86 | const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler, |
87 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>(), bool findSubstringKeys = false) const; | 87 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>(), bool findSubstringKeys = false) const; |
88 | 88 | ||
89 | /** | ||
90 | * Finds the last value in a series matched by prefix. | ||
91 | * | ||
92 | * This is used to match by uid prefix and find the highest revision. | ||
93 | * Note that this relies on a key scheme like $uid$revision. | ||
94 | */ | ||
89 | void findLatest(const QByteArray &uid, | 95 | void findLatest(const QByteArray &uid, |
90 | const std::function<void(const QByteArray &key, const QByteArray &value)> &resultHandler, | 96 | const std::function<void(const QByteArray &key, const QByteArray &value)> &resultHandler, |
91 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()) const; | 97 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()) const; |