summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-04 15:07:35 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-04 15:07:35 +0100
commitc04755a772cbc6b2cf3a80e9c3c17b718e153c55 (patch)
tree9284c7c1bcd58912d19a5d2a614b5953443556ff /common/typeindex.cpp
parentba94c4300c52dd80774ed7affc2ef9b4508cb7be (diff)
downloadsink-c04755a772cbc6b2cf3a80e9c3c17b718e153c55.tar.gz
sink-c04755a772cbc6b2cf3a80e9c3c17b718e153c55.zip
User querybase
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index 036b662..b0494f3 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -148,7 +148,7 @@ void TypeIndex::remove(const QByteArray &identifier, const Sink::ApplicationDoma
148 } 148 }
149} 149}
150 150
151static QVector<QByteArray> indexLookup(Index &index, Query::Comparator filter) 151static QVector<QByteArray> indexLookup(Index &index, QueryBase::Comparator filter)
152{ 152{
153 QVector<QByteArray> keys; 153 QVector<QByteArray> keys;
154 QByteArrayList lookupKeys; 154 QByteArrayList lookupKeys;
@@ -167,11 +167,11 @@ static QVector<QByteArray> indexLookup(Index &index, Query::Comparator filter)
167 return keys; 167 return keys;
168} 168}
169 169
170QVector<QByteArray> TypeIndex::query(const Sink::Query &query, QSet<QByteArray> &appliedFilters, QByteArray &appliedSorting, Sink::Storage::DataStore::Transaction &transaction) 170QVector<QByteArray> TypeIndex::query(const Sink::QueryBase &query, QSet<QByteArray> &appliedFilters, QByteArray &appliedSorting, Sink::Storage::DataStore::Transaction &transaction)
171{ 171{
172 QVector<QByteArray> keys; 172 QVector<QByteArray> keys;
173 for (auto it = mSortedProperties.constBegin(); it != mSortedProperties.constEnd(); it++) { 173 for (auto it = mSortedProperties.constBegin(); it != mSortedProperties.constEnd(); it++) {
174 if (query.hasFilter(it.key()) && query.sortProperty == it.value()) { 174 if (query.hasFilter(it.key()) && query.sortProperty() == it.value()) {
175 Index index(indexName(it.key(), it.value()), transaction); 175 Index index(indexName(it.key(), it.value()), transaction);
176 keys << indexLookup(index, query.getFilter(it.key())); 176 keys << indexLookup(index, query.getFilter(it.key()));
177 appliedFilters << it.key(); 177 appliedFilters << it.key();