summaryrefslogtreecommitdiffstats
path: root/common/queryrunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r--common/queryrunner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp
index 1eacb8e..780b341 100644
--- a/common/queryrunner.cpp
+++ b/common/queryrunner.cpp
@@ -72,7 +72,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
72 const QByteArray parentId = parent ? parent->identifier() : QByteArray(); 72 const QByteArray parentId = parent ? parent->identifier() : QByteArray();
73 SinkTrace() << "Running fetcher. Offset: " << mOffset[parentId] << " Batchsize: " << mBatchSize; 73 SinkTrace() << "Running fetcher. Offset: " << mOffset[parentId] << " Batchsize: " << mBatchSize;
74 auto resultProvider = mResultProvider; 74 auto resultProvider = mResultProvider;
75 if (query.synchronousQuery) { 75 if (query.synchronousQuery()) {
76 QueryWorker<DomainType> worker(query, mResourceContext, bufferType, mResultTransformation); 76 QueryWorker<DomainType> worker(query, mResourceContext, bufferType, mResultTransformation);
77 worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize); 77 worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize);
78 resultProvider->initialResultSetComplete(parent); 78 resultProvider->initialResultSetComplete(parent);
@@ -94,7 +94,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
94 } 94 }
95 mOffset[parentId] += newRevisionAndReplayedEntities.second; 95 mOffset[parentId] += newRevisionAndReplayedEntities.second;
96 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. 96 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise.
97 if (query.liveQuery) { 97 if (query.liveQuery()) {
98 mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first); 98 mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first);
99 } 99 }
100 resultProvider->setRevision(newRevisionAndReplayedEntities.first); 100 resultProvider->setRevision(newRevisionAndReplayedEntities.first);
@@ -105,8 +105,8 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
105 }); 105 });
106 106
107 // In case of a live query we keep the runner for as long alive as the result provider exists 107 // In case of a live query we keep the runner for as long alive as the result provider exists
108 if (query.liveQuery) { 108 if (query.liveQuery()) {
109 Q_ASSERT(!query.synchronousQuery); 109 Q_ASSERT(!query.synchronousQuery());
110 // Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting 110 // Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting
111 setQuery([=]() -> KAsync::Job<void> { 111 setQuery([=]() -> KAsync::Job<void> {
112 auto resultProvider = mResultProvider; 112 auto resultProvider = mResultProvider;