From 77562cdae63e0ec7b09e8ece6af97165ba9e48dd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 3 Jun 2016 12:41:07 +0200 Subject: A way to retrieve the last revision during changereplay. --- common/storage_common.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/storage_common.cpp') diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 4ca484a..8227a98 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp @@ -163,6 +163,11 @@ QByteArray Storage::uidFromKey(const QByteArray &key) return key.mid(0, 38); } +qint64 Storage::revisionFromKey(const QByteArray &key) +{ + return key.mid(39).toLongLong(); +} + Storage::NamedDatabase Storage::mainDatabase(const Sink::Storage::Transaction &t, const QByteArray &type) { return t.openDatabase(type + ".main"); -- cgit v1.2.3