diff options
Diffstat (limited to 'common/datastorequery.h')
-rw-r--r-- | common/datastorequery.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/datastorequery.h b/common/datastorequery.h index 164d721..4cf25b2 100644 --- a/common/datastorequery.h +++ b/common/datastorequery.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "query.h" | 25 | #include "query.h" |
26 | #include "entitybuffer.h" | 26 | #include "entitybuffer.h" |
27 | #include "log.h" | 27 | #include "log.h" |
28 | #include "storage/entitystore.h" | ||
28 | 29 | ||
29 | 30 | ||
30 | class Source; | 31 | class Source; |
@@ -35,11 +36,11 @@ class DataStoreQuery { | |||
35 | public: | 36 | public: |
36 | typedef QSharedPointer<DataStoreQuery> Ptr; | 37 | typedef QSharedPointer<DataStoreQuery> Ptr; |
37 | 38 | ||
38 | DataStoreQuery(const Sink::Query &query, const QByteArray &type, Sink::Storage::Transaction &transaction, TypeIndex &typeIndex, std::function<QVariant(const Sink::Entity &entity, const QByteArray &property)> getProperty); | 39 | DataStoreQuery(const Sink::Query &query, const QByteArray &type, Sink::Storage::EntityStore::Ptr store, TypeIndex &typeIndex, std::function<QVariant(const Sink::Entity &entity, const QByteArray &property)> getProperty); |
39 | ResultSet execute(); | 40 | ResultSet execute(); |
40 | ResultSet update(qint64 baseRevision); | 41 | ResultSet update(qint64 baseRevision); |
41 | 42 | ||
42 | protected: | 43 | private: |
43 | 44 | ||
44 | typedef std::function<bool(const QByteArray &uid, const Sink::EntityBuffer &entityBuffer)> FilterFunction; | 45 | typedef std::function<bool(const QByteArray &uid, const Sink::EntityBuffer &entityBuffer)> FilterFunction; |
45 | typedef std::function<void(const QByteArray &uid, const Sink::EntityBuffer &entityBuffer)> BufferCallback; | 46 | typedef std::function<void(const QByteArray &uid, const Sink::EntityBuffer &entityBuffer)> BufferCallback; |
@@ -56,15 +57,15 @@ protected: | |||
56 | QByteArrayList executeSubquery(const Sink::Query &subquery); | 57 | QByteArrayList executeSubquery(const Sink::Query &subquery); |
57 | 58 | ||
58 | Sink::Query mQuery; | 59 | Sink::Query mQuery; |
59 | Sink::Storage::Transaction &mTransaction; | ||
60 | const QByteArray mType; | 60 | const QByteArray mType; |
61 | TypeIndex &mTypeIndex; | 61 | TypeIndex &mTypeIndex; |
62 | Sink::Storage::NamedDatabase mDb; | ||
63 | std::function<QVariant(const Sink::Entity &entity, const QByteArray &property)> mGetProperty; | 62 | std::function<QVariant(const Sink::Entity &entity, const QByteArray &property)> mGetProperty; |
64 | bool mInitialQuery; | 63 | bool mInitialQuery; |
65 | QSharedPointer<FilterBase> mCollector; | 64 | QSharedPointer<FilterBase> mCollector; |
66 | QSharedPointer<Source> mSource; | 65 | QSharedPointer<Source> mSource; |
67 | 66 | ||
67 | QSharedPointer<Sink::Storage::EntityStore> mStore; | ||
68 | |||
68 | SINK_DEBUG_COMPONENT(mType) | 69 | SINK_DEBUG_COMPONENT(mType) |
69 | }; | 70 | }; |
70 | 71 | ||