From a98311fbc807b83ecfc65a17f98464e5f1f9b3f8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Sep 2017 02:34:10 +0200 Subject: Fixed getUids by type filtering. We used to simply return all uids. Requires "sinksh upgrade" --- common/storage/entitystore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/storage') diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 1ac87b7..5514e31 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp @@ -267,7 +267,7 @@ bool EntityStore::add(const QByteArray &type, ApplicationDomain::ApplicationDoma [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Failed to write entity" << entity.identifier() << newRevision; }); DataStore::setMaxRevision(d->transaction, newRevision); DataStore::recordRevision(d->transaction, newRevision, entity.identifier(), type); - DataStore::recordUid(d->transaction, entity.identifier()); + DataStore::recordUid(d->transaction, entity.identifier(), type); SinkTraceCtx(d->logCtx) << "Wrote entity: " << entity.identifier() << type << newRevision; return true; } @@ -379,7 +379,7 @@ bool EntityStore::remove(const QByteArray &type, const Sink::ApplicationDomain:: [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Failed to write entity" << uid << newRevision; }); DataStore::setMaxRevision(d->transaction, newRevision); DataStore::recordRevision(d->transaction, newRevision, uid, type); - DataStore::removeUid(d->transaction, uid); + DataStore::removeUid(d->transaction, uid, type); return true; } @@ -638,7 +638,7 @@ ApplicationDomain::ApplicationDomainType EntityStore::readPrevious(const QByteAr void EntityStore::readAllUids(const QByteArray &type, const std::function callback) { - DataStore::getUids(d->getTransaction(), callback); + DataStore::getUids(type, d->getTransaction(), callback); } bool EntityStore::contains(const QByteArray &type, const QByteArray &uid) -- cgit v1.2.3