diff options
author | Rémi Nicole <nicole@kolabsystems.com> | 2018-05-28 10:08:49 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-28 10:09:31 +0200 |
commit | f400cee1d5896577c22626d0cf50478057989857 (patch) | |
tree | e24e77562e0e893f281965c512ca4b74f88b20d3 /common/index.h | |
parent | 411c7cdad70c5c7902002545fd107ed1b2ac06ac (diff) | |
download | sink-f400cee1d5896577c22626d0cf50478057989857.tar.gz sink-f400cee1d5896577c22626d0cf50478057989857.zip |
Implement ranged queries
Summary:
Notes:
- For now, only for QDateTime indexes
- Invalid QDateTimes are stored in the index (subject to change)
- Should be a drop-in replacement from ValueIndexes (except for `In` and `Contains` queries)
Reviewers: cmollekopf
Tags: #sink
Differential Revision: https://phabricator.kde.org/D13105
Diffstat (limited to 'common/index.h')
-rw-r--r-- | common/index.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/index.h b/common/index.h index f16a426..043cc90 100644 --- a/common/index.h +++ b/common/index.h | |||
@@ -40,6 +40,10 @@ public: | |||
40 | bool matchSubStringKeys = false); | 40 | bool matchSubStringKeys = false); |
41 | QByteArray lookup(const QByteArray &key); | 41 | QByteArray lookup(const QByteArray &key); |
42 | 42 | ||
43 | void rangeLookup(const QByteArray &lowerBound, const QByteArray &upperBound, | ||
44 | const std::function<void(const QByteArray &value)> &resultHandler, | ||
45 | const std::function<void(const Error &error)> &errorHandler); | ||
46 | |||
43 | private: | 47 | private: |
44 | Q_DISABLE_COPY(Index); | 48 | Q_DISABLE_COPY(Index); |
45 | Sink::Storage::DataStore::Transaction mTransaction; | 49 | Sink::Storage::DataStore::Transaction mTransaction; |