summaryrefslogtreecommitdiffstats
path: root/common/resultset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/resultset.cpp')
-rw-r--r--common/resultset.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/resultset.cpp b/common/resultset.cpp
index 13b5f16..9883f44 100644
--- a/common/resultset.cpp
+++ b/common/resultset.cpp
@@ -98,6 +98,22 @@ void ResultSet::skip(int number)
98 } 98 }
99} 99}
100 100
101qint64 ResultSet::replaySet(int offset, int batchSize, const Callback &callback)
102{
103 skip(offset);
104 int counter = 0;
105 while (!batchSize || (counter < batchSize)) {
106 const bool ret = next([this, &counter, callback](const ResultSet::Result &result) {
107 counter++;
108 callback(result);
109 });
110 if (!ret) {
111 break;
112 }
113 };
114 return counter;
115}
116
101QByteArray ResultSet::id() 117QByteArray ResultSet::id()
102{ 118{
103 if (mIt) { 119 if (mIt) {