diff options
Diffstat (limited to 'common/storage')
-rw-r--r-- | common/storage/entitystore.cpp | 9 | ||||
-rw-r--r-- | common/storage/entitystore.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 30c7a71..a3d9997 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp | |||
@@ -303,6 +303,15 @@ void EntityStore::cleanupRevision(qint64 revision) | |||
303 | DataStore::setCleanedUpRevision(d->transaction, revision); | 303 | DataStore::setCleanedUpRevision(d->transaction, revision); |
304 | } | 304 | } |
305 | 305 | ||
306 | void EntityStore::cleanupRevisions(qint64 revision) | ||
307 | { | ||
308 | const auto lastCleanRevision = DataStore::cleanedUpRevision(d->transaction); | ||
309 | SinkTrace() << "Cleaning up from " << lastCleanRevision + 1 << " to " << revision; | ||
310 | for (qint64 rev = lastCleanRevision + 1; rev <= revision; rev++) { | ||
311 | cleanupRevision(revision); | ||
312 | } | ||
313 | } | ||
314 | |||
306 | QVector<QByteArray> EntityStore::fullScan(const QByteArray &type) | 315 | QVector<QByteArray> EntityStore::fullScan(const QByteArray &type) |
307 | { | 316 | { |
308 | SinkTrace() << "Looking for : " << type; | 317 | SinkTrace() << "Looking for : " << type; |
diff --git a/common/storage/entitystore.h b/common/storage/entitystore.h index 39f5fc1..0e7572a 100644 --- a/common/storage/entitystore.h +++ b/common/storage/entitystore.h | |||
@@ -47,6 +47,7 @@ public: | |||
47 | bool modify(const QByteArray &type, const ApplicationDomain::ApplicationDomainType &, const QByteArrayList &deletions, bool replayToSource, const PreprocessModification &); | 47 | bool modify(const QByteArray &type, const ApplicationDomain::ApplicationDomainType &, const QByteArrayList &deletions, bool replayToSource, const PreprocessModification &); |
48 | bool remove(const QByteArray &type, const QByteArray &uid, bool replayToSource, const PreprocessRemoval &); | 48 | bool remove(const QByteArray &type, const QByteArray &uid, bool replayToSource, const PreprocessRemoval &); |
49 | void cleanupRevision(qint64 revision); | 49 | void cleanupRevision(qint64 revision); |
50 | void cleanupRevisions(qint64 revision); | ||
50 | 51 | ||
51 | void startTransaction(Sink::Storage::DataStore::AccessMode); | 52 | void startTransaction(Sink::Storage::DataStore::AccessMode); |
52 | void commitTransaction(); | 53 | void commitTransaction(); |