diff options
author | Minijackson <minijackson@riseup.net> | 2018-07-13 17:15:53 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-07-13 17:15:53 +0200 |
commit | 1b5499770273913ad26b213406df4208b10e2b3c (patch) | |
tree | 85e13a65e7c6e702db3e6c433b95e718e7072148 /common/storage/entitystore.h | |
parent | d0ab46b20b74acef104038cbc5c1b769be863cd3 (diff) | |
download | sink-1b5499770273913ad26b213406df4208b10e2b3c.tar.gz sink-1b5499770273913ad26b213406df4208b10e2b3c.zip |
Finish converting DataStoreQuery to new Key API
Diffstat (limited to 'common/storage/entitystore.h')
-rw-r--r-- | common/storage/entitystore.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/storage/entitystore.h b/common/storage/entitystore.h index c23a659..f3aa07d 100644 --- a/common/storage/entitystore.h +++ b/common/storage/entitystore.h | |||
@@ -59,7 +59,7 @@ public: | |||
59 | 59 | ||
60 | QVector<QByteArray> fullScan(const QByteArray &type); | 60 | QVector<QByteArray> fullScan(const QByteArray &type); |
61 | QVector<QByteArray> indexLookup(const QByteArray &type, const QueryBase &query, QSet<QByteArrayList> &appliedFilters, QByteArray &appliedSorting); | 61 | QVector<QByteArray> indexLookup(const QByteArray &type, const QueryBase &query, QSet<QByteArrayList> &appliedFilters, QByteArray &appliedSorting); |
62 | QVector<QByteArray> indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value); | 62 | QVector<Sink::Storage::Identifier> indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value); |
63 | void indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value, const std::function<void(const QByteArray &uid)> &callback); | 63 | void indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value, const std::function<void(const QByteArray &uid)> &callback); |
64 | template<typename EntityType, typename PropertyType> | 64 | template<typename EntityType, typename PropertyType> |
65 | void indexLookup(const QVariant &value, const std::function<void(const QByteArray &uid)> &callback) { | 65 | void indexLookup(const QVariant &value, const std::function<void(const QByteArray &uid)> &callback) { |
@@ -97,10 +97,10 @@ public: | |||
97 | } | 97 | } |
98 | 98 | ||
99 | 99 | ||
100 | void readPrevious(const QByteArray &type, const QByteArray &uid, qint64 revision, const std::function<void(const QByteArray &uid, const EntityBuffer &entity)> callback); | 100 | void readPrevious(const QByteArray &type, const Sink::Storage::Identifier &uid, qint64 revision, const std::function<void(const QByteArray &uid, const EntityBuffer &entity)> callback); |
101 | void readPrevious(const QByteArray &type, const QByteArray &uid, qint64 revision, const std::function<void(const ApplicationDomainType &entity)> callback); | 101 | void readPrevious(const QByteArray &type, const Sink::Storage::Identifier &id, qint64 revision, const std::function<void(const ApplicationDomainType &entity)> callback); |
102 | ///Returns a copy | 102 | ///Returns a copy |
103 | ApplicationDomainType readPrevious(const QByteArray &type, const QByteArray &uid, qint64 revision); | 103 | ApplicationDomainType readPrevious(const QByteArray &type, const Sink::Storage::Identifier &id, qint64 revision); |
104 | 104 | ||
105 | template<typename T> | 105 | template<typename T> |
106 | T readPrevious(const QByteArray &uid, qint64 revision) { | 106 | T readPrevious(const QByteArray &uid, qint64 revision) { |
@@ -118,7 +118,7 @@ public: | |||
118 | }); | 118 | }); |
119 | } | 119 | } |
120 | 120 | ||
121 | void readRevisions(qint64 baseRevision, const QByteArray &type, const std::function<void(const QByteArray &key)> &callback); | 121 | void readRevisions(qint64 baseRevision, const QByteArray &type, const std::function<void(const Key &key)> &callback); |
122 | 122 | ||
123 | ///Db contains entity (but may already be marked as removed | 123 | ///Db contains entity (but may already be marked as removed |
124 | bool contains(const QByteArray &type, const QByteArray &uid); | 124 | bool contains(const QByteArray &type, const QByteArray &uid); |