summaryrefslogtreecommitdiffstats
path: root/common/domain/event.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-18 12:44:12 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-21 09:18:49 +0200
commit71a0167e0216f84588b492c84e92667847fbe5a5 (patch)
tree016718fe0ab13359e9738b9ddbf2450b05bb4603 /common/domain/event.cpp
parent2a9c738b813133d398683596df6d41d355e3cb3b (diff)
downloadsink-71a0167e0216f84588b492c84e92667847fbe5a5.tar.gz
sink-71a0167e0216f84588b492c84e92667847fbe5a5.zip
Use the ApplicationDomainType in the queries as well.
We have to access properties, so we need the mapper anyways, and the ApplicationDomainType type shouldn't be a large overhead anyways.
Diffstat (limited to 'common/domain/event.cpp')
-rw-r--r--common/domain/event.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/common/domain/event.cpp b/common/domain/event.cpp
index 6717187..d50652d 100644
--- a/common/domain/event.cpp
+++ b/common/domain/event.cpp
@@ -87,13 +87,3 @@ QSharedPointer<WritePropertyMapper<TypeImplementation<Event>::BufferBuilder> > T
87 propertyMapper->addMapping<Event::Attachment>(&BufferBuilder::add_attachment); 87 propertyMapper->addMapping<Event::Attachment>(&BufferBuilder::add_attachment);
88 return propertyMapper; 88 return propertyMapper;
89} 89}
90
91DataStoreQuery::Ptr TypeImplementation<Event>::prepareQuery(const Sink::Query &query, Sink::Storage::EntityStore::Ptr store)
92{
93 auto mapper = initializeReadPropertyMapper();
94 return DataStoreQuery::Ptr::create(query, ApplicationDomain::getTypeName<Event>(), store, [mapper](const Sink::Entity &entity, const QByteArray &property) {
95
96 const auto localBuffer = Sink::EntityBuffer::readBuffer<Buffer>(entity.local());
97 return mapper->getProperty(property, localBuffer);
98 });
99}