diff options
author | Minijackson <minijackson@riseup.net> | 2018-07-04 16:12:58 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-07-04 16:12:58 +0200 |
commit | be09c96b977db014932a3d28b5ee6643ed5eff84 (patch) | |
tree | a460c06d845282c3e7beafc422e695a134c662e0 /common/index.h | |
parent | 456d18b45a825a4d236ccc10c576da1fcbc4f74d (diff) | |
download | sink-be09c96b977db014932a3d28b5ee6643ed5eff84.tar.gz sink-be09c96b977db014932a3d28b5ee6643ed5eff84.zip |
Use key API in indexes
Diffstat (limited to 'common/index.h')
-rw-r--r-- | common/index.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/index.h b/common/index.h index 492319e..833701e 100644 --- a/common/index.h +++ b/common/index.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <QString> | 6 | #include <QString> |
7 | #include "storage.h" | 7 | #include "storage.h" |
8 | #include "log.h" | 8 | #include "log.h" |
9 | #include "storage/key.h" | ||
9 | 10 | ||
10 | /** | 11 | /** |
11 | * An index for value pairs. | 12 | * An index for value pairs. |
@@ -35,7 +36,9 @@ public: | |||
35 | Index(const QByteArray &name, Sink::Storage::DataStore::Transaction &); | 36 | Index(const QByteArray &name, Sink::Storage::DataStore::Transaction &); |
36 | 37 | ||
37 | void add(const QByteArray &key, const QByteArray &value); | 38 | void add(const QByteArray &key, const QByteArray &value); |
39 | void add(const Sink::Storage::Identifier &key, const QByteArray &value); | ||
38 | void remove(const QByteArray &key, const QByteArray &value); | 40 | void remove(const QByteArray &key, const QByteArray &value); |
41 | void remove(const Sink::Storage::Identifier &key, const QByteArray &value); | ||
39 | 42 | ||
40 | void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, const std::function<void(const Error &error)> &errorHandler, | 43 | void lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, const std::function<void(const Error &error)> &errorHandler, |
41 | bool matchSubStringKeys = false); | 44 | bool matchSubStringKeys = false); |