diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/event.cpp | 3 | ||||
-rw-r--r-- | common/domain/event.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/common/domain/event.cpp b/common/domain/event.cpp index 776fa50..c435c6b 100644 --- a/common/domain/event.cpp +++ b/common/domain/event.cpp | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | using namespace Akonadi2::ApplicationDomain; | 33 | using namespace Akonadi2::ApplicationDomain; |
34 | 34 | ||
35 | ResultSet TypeImplementation<Event>::queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier) | 35 | ResultSet TypeImplementation<Event>::queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier, QSet<QByteArray> &appliedFilters) |
36 | { | 36 | { |
37 | QVector<QByteArray> keys; | 37 | QVector<QByteArray> keys; |
38 | if (query.propertyFilter.contains("uid")) { | 38 | if (query.propertyFilter.contains("uid")) { |
@@ -43,6 +43,7 @@ ResultSet TypeImplementation<Event>::queryIndexes(const Akonadi2::Query &query, | |||
43 | [](const Index::Error &error) { | 43 | [](const Index::Error &error) { |
44 | Warning() << "Error in index: " << error.message; | 44 | Warning() << "Error in index: " << error.message; |
45 | }); | 45 | }); |
46 | appliedFilters << "uid"; | ||
46 | } | 47 | } |
47 | return ResultSet(keys); | 48 | return ResultSet(keys); |
48 | } | 49 | } |
diff --git a/common/domain/event.h b/common/domain/event.h index d40e55d..68c684a 100644 --- a/common/domain/event.h +++ b/common/domain/event.h | |||
@@ -39,18 +39,21 @@ namespace ApplicationDomain { | |||
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Implements all type-specific code such as updating and querying indexes. | 41 | * Implements all type-specific code such as updating and querying indexes. |
42 | * | ||
43 | * These are type specifiy default implementations. Theoretically a resource could implement it's own implementation. | ||
42 | */ | 44 | */ |
43 | template<> | 45 | template<> |
44 | class TypeImplementation<Akonadi2::ApplicationDomain::Event> { | 46 | class TypeImplementation<Akonadi2::ApplicationDomain::Event> { |
45 | public: | 47 | public: |
46 | typedef Akonadi2::ApplicationDomain::Buffer::Event Buffer; | 48 | typedef Akonadi2::ApplicationDomain::Buffer::Event Buffer; |
47 | typedef Akonadi2::ApplicationDomain::Buffer::EventBuilder BufferBuilder; | 49 | typedef Akonadi2::ApplicationDomain::Buffer::EventBuilder BufferBuilder; |
50 | static QSet<QByteArray> indexedProperties(); | ||
48 | /** | 51 | /** |
49 | * Returns the potential result set based on the indexes. | 52 | * Returns the potential result set based on the indexes. |
50 | * | 53 | * |
51 | * An empty result set indicates that a full scan is required. | 54 | * An empty result set indicates that a full scan is required. |
52 | */ | 55 | */ |
53 | static ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier); | 56 | static ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier, QSet<QByteArray> &appliedFilters); |
54 | static void index(const Event &type); | 57 | static void index(const Event &type); |
55 | static QSharedPointer<ReadPropertyMapper<Buffer> > initializeReadPropertyMapper(); | 58 | static QSharedPointer<ReadPropertyMapper<Buffer> > initializeReadPropertyMapper(); |
56 | static QSharedPointer<WritePropertyMapper<BufferBuilder> > initializeWritePropertyMapper(); | 59 | static QSharedPointer<WritePropertyMapper<BufferBuilder> > initializeWritePropertyMapper(); |