diff options
Diffstat (limited to 'common/datastorequery.cpp')
-rw-r--r-- | common/datastorequery.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp index 0db59e1..2e0c348 100644 --- a/common/datastorequery.cpp +++ b/common/datastorequery.cpp | |||
@@ -144,7 +144,7 @@ public: | |||
144 | const auto property = entity.getProperty(filterProperty); | 144 | const auto property = entity.getProperty(filterProperty); |
145 | const auto comparator = propertyFilter.value(filterProperty); | 145 | const auto comparator = propertyFilter.value(filterProperty); |
146 | if (!comparator.matches(property)) { | 146 | if (!comparator.matches(property)) { |
147 | SinkTraceCtx(mDatastore->mLogCtx) << "Filtering entity due to property mismatch on filter: " << filterProperty << property << ":" << comparator.value; | 147 | SinkTraceCtx(mDatastore->mLogCtx) << "Filtering entity due to property mismatch on filter: " << entity.identifier() << "Property: " << filterProperty << property << " Filter:" << comparator.value; |
148 | return false; | 148 | return false; |
149 | } | 149 | } |
150 | } | 150 | } |
@@ -367,19 +367,22 @@ public: | |||
367 | DataStoreQuery::DataStoreQuery(const Sink::QueryBase &query, const QByteArray &type, EntityStore &store) | 367 | DataStoreQuery::DataStoreQuery(const Sink::QueryBase &query, const QByteArray &type, EntityStore &store) |
368 | : mType(type), mStore(store), mLogCtx(store.logContext().subContext("datastorequery")) | 368 | : mType(type), mStore(store), mLogCtx(store.logContext().subContext("datastorequery")) |
369 | { | 369 | { |
370 | //This is what we use during a new query | ||
370 | setupQuery(query); | 371 | setupQuery(query); |
371 | } | 372 | } |
372 | 373 | ||
373 | DataStoreQuery::DataStoreQuery(const DataStoreQuery::State &state, const QByteArray &type, Sink::Storage::EntityStore &store) | 374 | DataStoreQuery::DataStoreQuery(const DataStoreQuery::State &state, const QByteArray &type, Sink::Storage::EntityStore &store, bool incremental) |
374 | : mType(type), mStore(store), mLogCtx(store.logContext().subContext("datastorequery")) | 375 | : mType(type), mStore(store), mLogCtx(store.logContext().subContext("datastorequery")) |
375 | { | 376 | { |
377 | //This is what we use when fetching more data, without having a new revision with incremental=false | ||
378 | //And this is what we use when the data changed and we want to update with incremental = true | ||
376 | mCollector = state.mCollector; | 379 | mCollector = state.mCollector; |
377 | mSource = state.mSource; | 380 | mSource = state.mSource; |
378 | 381 | ||
379 | auto source = mCollector; | 382 | auto source = mCollector; |
380 | while (source) { | 383 | while (source) { |
381 | source->mDatastore = this; | 384 | source->mDatastore = this; |
382 | source->mIncremental = true; | 385 | source->mIncremental = incremental; |
383 | source = source->mSource; | 386 | source = source->mSource; |
384 | } | 387 | } |
385 | } | 388 | } |