diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-29 17:52:45 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-29 17:52:45 +0100 |
commit | 0a2d20c474206553d5c981fd2a772188083101e9 (patch) | |
tree | 37a46837b4fa93834a9380ee02ef4188786e9acd /common/storage.h | |
parent | 70faf80be4146b17a59f9616404b21625d7400f6 (diff) | |
download | sink-0a2d20c474206553d5c981fd2a772188083101e9.tar.gz sink-0a2d20c474206553d5c981fd2a772188083101e9.zip |
Updated the index on modifications and removals.
Misses tests.
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/storage.h b/common/storage.h index aa0be4c..a4137ce 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -63,11 +63,17 @@ public: | |||
63 | bool write(const QByteArray &key, const QByteArray &value, const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); | 63 | bool write(const QByteArray &key, const QByteArray &value, const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Remove a value | 66 | * Remove a key |
67 | */ | 67 | */ |
68 | void remove(const QByteArray &key, | 68 | void remove(const QByteArray &key, |
69 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); | 69 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); |
70 | /** | 70 | /** |
71 | * Remove a key-value pair | ||
72 | */ | ||
73 | void remove(const QByteArray &key, const QByteArray &value, | ||
74 | const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); | ||
75 | |||
76 | /** | ||
71 | * Read values with a given key. | 77 | * Read values with a given key. |
72 | * | 78 | * |
73 | * * An empty @param key results in a full scan | 79 | * * An empty @param key results in a full scan |