summaryrefslogtreecommitdiffstats
path: root/common/resultset.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-19 18:55:21 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-19 18:55:21 +0200
commit4a14a6fade947aa830d3f21598a4a6ba7316b933 (patch)
treec6b340bf1c6284e5501d371f65b58e3a69391a26 /common/resultset.cpp
parent1deac558af4b1c9f04352ede7f8e172f11a70a6b (diff)
downloadsink-4a14a6fade947aa830d3f21598a4a6ba7316b933.tar.gz
sink-4a14a6fade947aa830d3f21598a4a6ba7316b933.zip
Refactored the query part of the entity reader into DataStoreQuery.
DataStoreQuery now encapsulates the low-level query that operates directly on the storage. It no longer has access to the resource buffers, and is instantiated by the type implementation, so we can specialize the query alogorithm per type, but not per resource. This will allow us to implement the threading queries for the mailtype.
Diffstat (limited to 'common/resultset.cpp')
-rw-r--r--common/resultset.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/resultset.cpp b/common/resultset.cpp
index 293035b..51914e9 100644
--- a/common/resultset.cpp
+++ b/common/resultset.cpp
@@ -18,7 +18,7 @@
18 */ 18 */
19#include "resultset.h" 19#include "resultset.h"
20 20
21#include "common/log.h" 21#include "log.h"
22 22
23ResultSet::ResultSet() : mIt(nullptr) 23ResultSet::ResultSet() : mIt(nullptr)
24{ 24{
@@ -78,12 +78,12 @@ bool ResultSet::next()
78 return true; 78 return true;
79 } 79 }
80 } else { 80 } else {
81 next([](const Sink::ApplicationDomain::ApplicationDomainType::Ptr &value, Sink::Operation) { return false; }); 81 next([](const QByteArray &, const Sink::EntityBuffer &, Sink::Operation) { return false; });
82 } 82 }
83 return false; 83 return false;
84} 84}
85 85
86bool ResultSet::next(std::function<bool(const Sink::ApplicationDomain::ApplicationDomainType::Ptr &value, Sink::Operation)> callback) 86bool ResultSet::next(const Callback &callback)
87{ 87{
88 Q_ASSERT(mValueGenerator); 88 Q_ASSERT(mValueGenerator);
89 return mValueGenerator(callback); 89 return mValueGenerator(callback);