summaryrefslogtreecommitdiffstats
path: root/common/datastorequery.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-21 22:06:12 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-22 11:32:53 +0100
commit86045e308c10c60cd7c4339d305cee1acb084760 (patch)
treeb8fd3e91ffbdeb8ad2e78a61fe1d3426eb5874be /common/datastorequery.h
parentdaf96f7efec0538e161eab8e906a291015842e1e (diff)
downloadsink-86045e308c10c60cd7c4339d305cee1acb084760.tar.gz
sink-86045e308c10c60cd7c4339d305cee1acb084760.zip
Maintain the query state instead of using the offset.
Instead of using the offset to skip over old results requires recalculating them, and resulted in some cases in results being added multiple times to the model. By just maintaining the state we can apply the offset directly to the base-set, and maintain the state in reduction etc. which is necessary to continue streaming results while making sure we don't report anything twice.
Diffstat (limited to 'common/datastorequery.h')
-rw-r--r--common/datastorequery.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/datastorequery.h b/common/datastorequery.h
index a797782..ee5f99e 100644
--- a/common/datastorequery.h
+++ b/common/datastorequery.h
@@ -46,7 +46,7 @@ public:
46 }; 46 };
47 47
48 DataStoreQuery(const Sink::QueryBase &query, const QByteArray &type, Sink::Storage::EntityStore &store); 48 DataStoreQuery(const Sink::QueryBase &query, const QByteArray &type, Sink::Storage::EntityStore &store);
49 DataStoreQuery(const DataStoreQuery::State &state, const QByteArray &type, Sink::Storage::EntityStore &store); 49 DataStoreQuery(const DataStoreQuery::State &state, const QByteArray &type, Sink::Storage::EntityStore &store, bool incremental);
50 ~DataStoreQuery(); 50 ~DataStoreQuery();
51 ResultSet execute(); 51 ResultSet execute();
52 ResultSet update(qint64 baseRevision); 52 ResultSet update(qint64 baseRevision);