summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules/sink_inspect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sinksh/syntax_modules/sink_inspect.cpp')
-rw-r--r--sinksh/syntax_modules/sink_inspect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sinksh/syntax_modules/sink_inspect.cpp b/sinksh/syntax_modules/sink_inspect.cpp
index 1d2d90f..52a9e0f 100644
--- a/sinksh/syntax_modules/sink_inspect.cpp
+++ b/sinksh/syntax_modules/sink_inspect.cpp
@@ -87,13 +87,13 @@ bool inspect(const QStringList &args, State &state)
87 [&] (const Sink::Storage::DataStore::Error &e) { 87 [&] (const Sink::Storage::DataStore::Error &e) {
88 Q_ASSERT(false); 88 Q_ASSERT(false);
89 state.printError(e.message); 89 state.printError(e.message);
90 }, false); 90 }, Sink::Storage::IntegerKeys);
91 91
92 auto ridMap = syncTransaction.openDatabase("localid.mapping." + type, 92 auto ridMap = syncTransaction.openDatabase("localid.mapping." + type,
93 [&] (const Sink::Storage::DataStore::Error &e) { 93 [&] (const Sink::Storage::DataStore::Error &e) {
94 Q_ASSERT(false); 94 Q_ASSERT(false);
95 state.printError(e.message); 95 state.printError(e.message);
96 }, false); 96 });
97 97
98 QHash<QByteArray, QByteArray> hash; 98 QHash<QByteArray, QByteArray> hash;
99 99
@@ -108,7 +108,8 @@ bool inspect(const QStringList &args, State &state)
108 108
109 QSet<QByteArray> uids; 109 QSet<QByteArray> uids;
110 db.scan("", [&] (const QByteArray &key, const QByteArray &data) { 110 db.scan("", [&] (const QByteArray &key, const QByteArray &data) {
111 uids.insert(Key::fromInternalByteArray(key).identifier().toDisplayByteArray()); 111 size_t revision = Sink::byteArrayToSizeT(key);
112 uids.insert(Sink::Storage::DataStore::getUidFromRevision(transaction, revision));
112 return true; 113 return true;
113 }, 114 },
114 [&](const Sink::Storage::DataStore::Error &e) { 115 [&](const Sink::Storage::DataStore::Error &e) {
@@ -180,7 +181,7 @@ bool inspect(const QStringList &args, State &state)
180 [&] (const Sink::Storage::DataStore::Error &e) { 181 [&] (const Sink::Storage::DataStore::Error &e) {
181 Q_ASSERT(false); 182 Q_ASSERT(false);
182 state.printError(e.message); 183 state.printError(e.message);
183 }, false); 184 });
184 185
185 if (showInternal) { 186 if (showInternal) {
186 //Print internal keys 187 //Print internal keys