summaryrefslogtreecommitdiffstats
path: root/common/storage.h
diff options
context:
space:
mode:
authorRémi Nicole <nicole@kolabsystems.com>2018-07-27 13:32:39 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-27 13:47:43 +0200
commitd1838e575baeb6cd08011645609516acbdabd6c8 (patch)
tree035b99a4d324231c8c44e0e97905383266bacba6 /common/storage.h
parent1855b8356e4c427efdba4c932fa9f984e6ae5a43 (diff)
downloadsink-d1838e575baeb6cd08011645609516acbdabd6c8.tar.gz
sink-d1838e575baeb6cd08011645609516acbdabd6c8.zip
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
Diffstat (limited to 'common/storage.h')
-rw-r--r--common/storage.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/storage.h b/common/storage.h
index a8c486c..8904148 100644
--- a/common/storage.h
+++ b/common/storage.h
@@ -22,8 +22,10 @@
22#pragma once 22#pragma once
23 23
24#include "sink_export.h" 24#include "sink_export.h"
25#include "utils.h"
25#include <string> 26#include <string>
26#include <functional> 27#include <functional>
28#include <QUuid>
27#include <QString> 29#include <QString>
28#include <QMap> 30#include <QMap>
29 31
@@ -237,10 +239,6 @@ public:
237 static bool isInternalKey(void *key, int keySize); 239 static bool isInternalKey(void *key, int keySize);
238 static bool isInternalKey(const QByteArray &key); 240 static bool isInternalKey(const QByteArray &key);
239 241
240 static QByteArray assembleKey(const QByteArray &key, qint64 revision);
241 static QByteArray uidFromKey(const QByteArray &key);
242 static qint64 revisionFromKey(const QByteArray &key);
243
244 static NamedDatabase mainDatabase(const Transaction &, const QByteArray &type); 242 static NamedDatabase mainDatabase(const Transaction &, const QByteArray &type);
245 243
246 static QByteArray generateUid(); 244 static QByteArray generateUid();