diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-10 21:54:04 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-10 21:54:04 +0100 |
commit | 95801103c1fc773b074eea1b2d03820099ac09a6 (patch) | |
tree | b55445cddc451b68ff171fceb729e4cc602b2531 /common/storage_common.cpp | |
parent | 4911df72dbc202dfcc4c64bb0ba311d7513707ae (diff) | |
download | sink-95801103c1fc773b074eea1b2d03820099ac09a6.tar.gz sink-95801103c1fc773b074eea1b2d03820099ac09a6.zip |
Storage: implemented scan
This can replace all our read calls. Note that we need a different API
for databases where the value needs to be loaded first, so we can do a key
scan before loading values. With this we can do key + value scans in one though.
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index bc1acc4..246611c 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -19,3 +19,8 @@ void Storage::read(const std::string &sKey, const std::function<bool(void *ptr, | |||
19 | read(sKey, resultHandler, &errorHandler); | 19 | read(sKey, resultHandler, &errorHandler); |
20 | } | 20 | } |
21 | 21 | ||
22 | void Storage::scan(const std::string &sKey, const std::function<bool(void *keyPtr, int keySize, void *valuePtr, int valueSize)> &resultHandler) | ||
23 | { | ||
24 | scan(sKey, resultHandler, &errorHandler); | ||
25 | } | ||
26 | |||