diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 16:02:38 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 16:02:38 +0100 |
commit | 1864024012213dc0a17c76e9755bf50a19944ec7 (patch) | |
tree | 06690c35c05c29deec30a3dd412d4043e2c956a3 /common/resultset.cpp | |
parent | 6625bb5a2145008ad47ae963e1546714b7342bf0 (diff) | |
download | sink-1864024012213dc0a17c76e9755bf50a19944ec7.tar.gz sink-1864024012213dc0a17c76e9755bf50a19944ec7.zip |
Report when we don't have any more to fetch.
... so we can use that information in fetchMore.
Diffstat (limited to 'common/resultset.cpp')
-rw-r--r-- | common/resultset.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/resultset.cpp b/common/resultset.cpp index 9883f44..b82b14d 100644 --- a/common/resultset.cpp +++ b/common/resultset.cpp | |||
@@ -98,7 +98,7 @@ void ResultSet::skip(int number) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | qint64 ResultSet::replaySet(int offset, int batchSize, const Callback &callback) | 101 | ResultSet::ReplayResult ResultSet::replaySet(int offset, int batchSize, const Callback &callback) |
102 | { | 102 | { |
103 | skip(offset); | 103 | skip(offset); |
104 | int counter = 0; | 104 | int counter = 0; |
@@ -108,10 +108,10 @@ qint64 ResultSet::replaySet(int offset, int batchSize, const Callback &callback) | |||
108 | callback(result); | 108 | callback(result); |
109 | }); | 109 | }); |
110 | if (!ret) { | 110 | if (!ret) { |
111 | break; | 111 | return {counter, true}; |
112 | } | 112 | } |
113 | }; | 113 | }; |
114 | return counter; | 114 | return {counter, false}; |
115 | } | 115 | } |
116 | 116 | ||
117 | QByteArray ResultSet::id() | 117 | QByteArray ResultSet::id() |