diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-16 17:43:22 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-16 17:43:22 +0100 |
commit | 529dd17eec62a9702b8837f8f1976dfbf28fdd82 (patch) | |
tree | 3fe5581a76b83cd9c4360b67e7dd99ceb8c0eaab /common/index.cpp | |
parent | 8acaae496f9e816c4c1b1126fc6409b6fafe6500 (diff) | |
download | sink-529dd17eec62a9702b8837f8f1976dfbf28fdd82.tar.gz sink-529dd17eec62a9702b8837f8f1976dfbf28fdd82.zip |
Prepared sort indexes
Diffstat (limited to 'common/index.cpp')
-rw-r--r-- | common/index.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/index.cpp b/common/index.cpp index ae56da1..e35b838 100644 --- a/common/index.cpp +++ b/common/index.cpp | |||
@@ -31,7 +31,7 @@ void Index::remove(const QByteArray &key, const QByteArray &value) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | void Index::lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, | 33 | void Index::lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, |
34 | const std::function<void(const Error &error)> &errorHandler) | 34 | const std::function<void(const Error &error)> &errorHandler, bool matchSubStringKeys) |
35 | { | 35 | { |
36 | mDb.scan(key, [this, resultHandler](const QByteArray &key, const QByteArray &value) -> bool { | 36 | mDb.scan(key, [this, resultHandler](const QByteArray &key, const QByteArray &value) -> bool { |
37 | resultHandler(value); | 37 | resultHandler(value); |
@@ -40,8 +40,8 @@ void Index::lookup(const QByteArray &key, const std::function<void(const QByteAr | |||
40 | [errorHandler](const Sink::Storage::Error &error) { | 40 | [errorHandler](const Sink::Storage::Error &error) { |
41 | Warning() << "Error while retrieving value" << error.message; | 41 | Warning() << "Error while retrieving value" << error.message; |
42 | errorHandler(Error(error.store, error.code, error.message)); | 42 | errorHandler(Error(error.store, error.code, error.message)); |
43 | } | 43 | }, |
44 | ); | 44 | matchSubStringKeys); |
45 | } | 45 | } |
46 | 46 | ||
47 | QByteArray Index::lookup(const QByteArray &key) | 47 | QByteArray Index::lookup(const QByteArray &key) |