From d1838e575baeb6cd08011645609516acbdabd6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Nicole?= Date: Fri, 27 Jul 2018 13:32:39 +0200 Subject: New Key API in storage layer Summary: - Use object oriented paradigm for Keys / Identifiers /Revisions - "Compress" keys by using byte representation of Uuids - Still some cleaning left to do - Also run some benchmarks - I'm questioning whether files other than entitystore (tests excluded) are allowed to access this API Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D13735 --- common/storage_common.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'common/storage_common.cpp') diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 057dce4..f96097a 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp @@ -194,23 +194,6 @@ bool DataStore::isInternalKey(const QByteArray &key) return key.startsWith(s_internalPrefix); } -QByteArray DataStore::assembleKey(const QByteArray &key, qint64 revision) -{ - Q_ASSERT(revision <= 9223372036854775807); - Q_ASSERT(key.size() == s_lengthOfUid); - return key + QByteArray::number(revision).rightJustified(19, '0', false); -} - -QByteArray DataStore::uidFromKey(const QByteArray &key) -{ - return key.mid(0, s_lengthOfUid); -} - -qint64 DataStore::revisionFromKey(const QByteArray &key) -{ - return key.mid(s_lengthOfUid + 1).toLongLong(); -} - QByteArray DataStore::generateUid() { return createUuid(); -- cgit v1.2.3