summaryrefslogtreecommitdiffstats
path: root/common/queryrunner.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-07-27 02:26:47 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-15 16:14:19 +0200
commit26816c21f60450e461a5b6ef4ef740f6070ce278 (patch)
tree55e8aee03e094abf702438e6cd26233047345e70 /common/queryrunner.cpp
parent9a9bb39f7641a818434cafa0dae0c8aa47124c0b (diff)
downloadsink-26816c21f60450e461a5b6ef4ef740f6070ce278.tar.gz
sink-26816c21f60450e461a5b6ef4ef740f6070ce278.zip
Ported to the kasync revamp
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r--common/queryrunner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp
index 2e2e96d..052db39 100644
--- a/common/queryrunner.cpp
+++ b/common/queryrunner.cpp
@@ -86,7 +86,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
86 const auto newRevisionAndReplayedEntities = worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize); 86 const auto newRevisionAndReplayedEntities = worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize);
87 return newRevisionAndReplayedEntities; 87 return newRevisionAndReplayedEntities;
88 }) 88 })
89 .template then<void, QPair<qint64, qint64>>([=](const QPair<qint64, qint64> &newRevisionAndReplayedEntities) { 89 .template syncThen<void, QPair<qint64, qint64>>([=](const QPair<qint64, qint64> &newRevisionAndReplayedEntities) {
90 mOffset[parentId] += newRevisionAndReplayedEntities.second; 90 mOffset[parentId] += newRevisionAndReplayedEntities.second;
91 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. 91 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise.
92 if (query.liveQuery) { 92 if (query.liveQuery) {
@@ -110,7 +110,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
110 const auto newRevisionAndReplayedEntities = worker.executeIncrementalQuery(query, *resultProvider); 110 const auto newRevisionAndReplayedEntities = worker.executeIncrementalQuery(query, *resultProvider);
111 return newRevisionAndReplayedEntities; 111 return newRevisionAndReplayedEntities;
112 }) 112 })
113 .template then<void, QPair<qint64, qint64> >([query, this, resultProvider](const QPair<qint64, qint64> &newRevisionAndReplayedEntities) { 113 .template syncThen<void, QPair<qint64, qint64> >([query, this, resultProvider](const QPair<qint64, qint64> &newRevisionAndReplayedEntities) {
114 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. 114 // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise.
115 mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first); 115 mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first);
116 resultProvider->setRevision(newRevisionAndReplayedEntities.first); 116 resultProvider->setRevision(newRevisionAndReplayedEntities.first);