summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-24 13:30:34 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-15 13:30:55 +0200
commit1ef92b9d681e614d65b0ca0a2abdfd81a943e778 (patch)
tree840fc1720c86158dfff33566b2821f2075e38fc5 /common/typeindex.cpp
parent1963f3444e92932f3a31526dc91760d98d027bea (diff)
downloadsink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.tar.gz
sink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.zip
Added threading index cleanup
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index 113c209..5a19839 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -282,6 +282,18 @@ void TypeIndex::index<QString, QByteArray>(const QByteArray &leftName, const QBy
282} 282}
283 283
284template <> 284template <>
285void TypeIndex::unindex<QByteArray, QByteArray>(const QByteArray &leftName, const QByteArray &rightName, const QVariant &leftValue, const QVariant &rightValue, Sink::Storage::DataStore::Transaction &transaction)
286{
287 Index(indexName(leftName + rightName), transaction).remove(getByteArray(leftValue), getByteArray(rightValue));
288}
289
290template <>
291void TypeIndex::unindex<QString, QByteArray>(const QByteArray &leftName, const QByteArray &rightName, const QVariant &leftValue, const QVariant &rightValue, Sink::Storage::DataStore::Transaction &transaction)
292{
293 Index(indexName(leftName + rightName), transaction).remove(getByteArray(leftValue), getByteArray(rightValue));
294}
295
296template <>
285QVector<QByteArray> TypeIndex::secondaryLookup<QByteArray>(const QByteArray &leftName, const QByteArray &rightName, const QVariant &value) 297QVector<QByteArray> TypeIndex::secondaryLookup<QByteArray>(const QByteArray &leftName, const QByteArray &rightName, const QVariant &value)
286{ 298{
287 QVector<QByteArray> keys; 299 QVector<QByteArray> keys;