summaryrefslogtreecommitdiffstats
path: root/common/datastorequery.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-05 20:07:53 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-05 20:07:53 +0200
commit94829f17066dcbbeb9f641a4870dd88aa916ba24 (patch)
treecef0fef888e999cc840bbe90a9c155eae1b0890c /common/datastorequery.cpp
parente470f65cad943f8a3065c6f5f6287adcc704627e (diff)
downloadsink-94829f17066dcbbeb9f641a4870dd88aa916ba24.tar.gz
sink-94829f17066dcbbeb9f641a4870dd88aa916ba24.zip
A better resource filter api
Diffstat (limited to 'common/datastorequery.cpp')
-rw-r--r--common/datastorequery.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp
index 0cc30e5..7341675 100644
--- a/common/datastorequery.cpp
+++ b/common/datastorequery.cpp
@@ -409,9 +409,6 @@ void DataStoreQuery::setupQuery()
409{ 409{
410 auto baseFilters = mQuery.getBaseFilters(); 410 auto baseFilters = mQuery.getBaseFilters();
411 for (const auto &k : baseFilters.keys()) { 411 for (const auto &k : baseFilters.keys()) {
412 if (k == ApplicationDomain::Entity::Resource::name) {
413 continue;
414 }
415 const auto comparator = baseFilters.value(k); 412 const auto comparator = baseFilters.value(k);
416 if (comparator.value.canConvert<Query>()) { 413 if (comparator.value.canConvert<Query>()) {
417 SinkTrace() << "Executing subquery for property: " << k; 414 SinkTrace() << "Executing subquery for property: " << k;
@@ -446,9 +443,6 @@ void DataStoreQuery::setupQuery()
446 auto filter = Filter::Ptr::create(baseSet, this); 443 auto filter = Filter::Ptr::create(baseSet, this);
447 //For incremental queries the remaining filters are not sufficient 444 //For incremental queries the remaining filters are not sufficient
448 for (const auto &f : mQuery.getBaseFilters().keys()) { 445 for (const auto &f : mQuery.getBaseFilters().keys()) {
449 if (f == ApplicationDomain::Entity::Resource::name) {
450 continue;
451 }
452 filter->propertyFilter.insert(f, mQuery.getFilter(f)); 446 filter->propertyFilter.insert(f, mQuery.getFilter(f));
453 } 447 }
454 baseSet = filter; 448 baseSet = filter;
@@ -459,7 +453,7 @@ void DataStoreQuery::setupQuery()
459 /* } */ 453 /* } */
460 454
461 //Setup the rest of the filter stages on top of the base set 455 //Setup the rest of the filter stages on top of the base set
462 for (const auto &stage : mQuery.filterStages.mid(1)) { 456 for (const auto &stage : mQuery.getFilterStages()) {
463 if (auto filter = stage.dynamicCast<Query::Filter>()) { 457 if (auto filter = stage.dynamicCast<Query::Filter>()) {
464 auto f = Filter::Ptr::create(baseSet, this); 458 auto f = Filter::Ptr::create(baseSet, this);
465 f->propertyFilter = filter->propertyFilter; 459 f->propertyFilter = filter->propertyFilter;