diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 12:41:07 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 12:41:07 +0200 |
commit | 77562cdae63e0ec7b09e8ece6af97165ba9e48dd (patch) | |
tree | b24d23335fd856881b7284532e7d4d36caa5ca13 /common/storage_common.cpp | |
parent | 6569a6dceec10c77578184ce68c26e20ba27fa39 (diff) | |
download | sink-77562cdae63e0ec7b09e8ece6af97165ba9e48dd.tar.gz sink-77562cdae63e0ec7b09e8ece6af97165ba9e48dd.zip |
A way to retrieve the last revision during changereplay.
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
163 | return key.mid(0, 38); | 163 | return key.mid(0, 38); |
164 | } | 164 | } |
165 | 165 | ||
166 | qint64 Storage::revisionFromKey(const QByteArray &key) | ||
167 | { | ||
168 | return key.mid(39).toLongLong(); | ||
169 | } | ||
170 | |||
166 | Storage::NamedDatabase Storage::mainDatabase(const Sink::Storage::Transaction &t, const QByteArray &type) | 171 | Storage::NamedDatabase Storage::mainDatabase(const Sink::Storage::Transaction &t, const QByteArray &type) |
167 | { | 172 | { |
168 | return t.openDatabase(type + ".main"); | 173 | return t.openDatabase(type + ".main"); |