From 1ef92b9d681e614d65b0ca0a2abdfd81a943e778 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 24 May 2017 13:30:34 +0200 Subject: Added threading index cleanup --- common/typeindex.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'common/typeindex.cpp') diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 113c209..5a19839 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp @@ -281,6 +281,18 @@ void TypeIndex::index(const QByteArray &leftName, const QBy Index(indexName(leftName + rightName), transaction).add(getByteArray(leftValue), getByteArray(rightValue)); } +template <> +void TypeIndex::unindex(const QByteArray &leftName, const QByteArray &rightName, const QVariant &leftValue, const QVariant &rightValue, Sink::Storage::DataStore::Transaction &transaction) +{ + Index(indexName(leftName + rightName), transaction).remove(getByteArray(leftValue), getByteArray(rightValue)); +} + +template <> +void TypeIndex::unindex(const QByteArray &leftName, const QByteArray &rightName, const QVariant &leftValue, const QVariant &rightValue, Sink::Storage::DataStore::Transaction &transaction) +{ + Index(indexName(leftName + rightName), transaction).remove(getByteArray(leftValue), getByteArray(rightValue)); +} + template <> QVector TypeIndex::secondaryLookup(const QByteArray &leftName, const QByteArray &rightName, const QVariant &value) { -- cgit v1.2.3