From 077e3cb30ace5f6ee20ee15e0d32d2bfb197fde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Nicole?= Date: Tue, 19 Jun 2018 11:04:17 +0200 Subject: Implement Overlap queries Summary: Notes: - Introduces the concept of queries on multiple properties (which meant changing query's internals a bit) - Dates are stored as well as the "reference" in the index to allow quick filtering without fetching the whole entity - Buckets are weeks starting on Monday (guaranteed by the use of the Julian calendar) - Some size improvements are definitely possible (dates are padded numbers again, not using integer databases, Julian calendar starts at a very old date, etc.) Test Plan: Tested in querytest Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D13477 --- common/storage/entitystore.cpp | 2 +- common/storage/entitystore.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'common/storage') diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 230dbc7..4fe7e3b 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp @@ -443,7 +443,7 @@ QVector EntityStore::fullScan(const QByteArray &type) return keys.toList().toVector(); } -QVector EntityStore::indexLookup(const QByteArray &type, const QueryBase &query, QSet &appliedFilters, QByteArray &appliedSorting) +QVector EntityStore::indexLookup(const QByteArray &type, const QueryBase &query, QSet &appliedFilters, QByteArray &appliedSorting) { if (!d->exists()) { SinkTraceCtx(d->logCtx) << "Database is not existing: " << type; diff --git a/common/storage/entitystore.h b/common/storage/entitystore.h index d79a0b5..ffa70b9 100644 --- a/common/storage/entitystore.h +++ b/common/storage/entitystore.h @@ -57,7 +57,7 @@ public: bool hasTransaction() const; QVector fullScan(const QByteArray &type); - QVector indexLookup(const QByteArray &type, const QueryBase &query, QSet &appliedFilters, QByteArray &appliedSorting); + QVector indexLookup(const QByteArray &type, const QueryBase &query, QSet &appliedFilters, QByteArray &appliedSorting); QVector indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value); void indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value, const std::function &callback); template -- cgit v1.2.3