diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 20:16:38 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 20:44:18 -0600 |
commit | b53881c6bd1aaf9841770120258a068a683b8bad (patch) | |
tree | f55f2db557d1c52e8ac449aa4ecabe5b6151f739 /sinksh/syntax_modules | |
parent | 1e9879479ea22017266de596db61d06d3950941b (diff) | |
download | sink-b53881c6bd1aaf9841770120258a068a683b8bad.tar.gz sink-b53881c6bd1aaf9841770120258a068a683b8bad.zip |
Some metadata for inspect
Diffstat (limited to 'sinksh/syntax_modules')
-rw-r--r-- | sinksh/syntax_modules/sink_inspect.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sinksh/syntax_modules/sink_inspect.cpp b/sinksh/syntax_modules/sink_inspect.cpp index a8a3805..848d576 100644 --- a/sinksh/syntax_modules/sink_inspect.cpp +++ b/sinksh/syntax_modules/sink_inspect.cpp | |||
@@ -19,8 +19,6 @@ | |||
19 | 19 | ||
20 | #include <QDebug> | 20 | #include <QDebug> |
21 | #include <QObject> // tr() | 21 | #include <QObject> // tr() |
22 | #include <QTimer> | ||
23 | #include <QDir> | ||
24 | 22 | ||
25 | #include "common/resource.h" | 23 | #include "common/resource.h" |
26 | #include "common/storage.h" | 24 | #include "common/storage.h" |
@@ -30,6 +28,7 @@ | |||
30 | #include "common/definitions.h" | 28 | #include "common/definitions.h" |
31 | #include "common/entitybuffer.h" | 29 | #include "common/entitybuffer.h" |
32 | #include "common/metadata_generated.h" | 30 | #include "common/metadata_generated.h" |
31 | #include "common/bufferutils.h" | ||
33 | 32 | ||
34 | #include "sinksh_utils.h" | 33 | #include "sinksh_utils.h" |
35 | #include "state.h" | 34 | #include "state.h" |
@@ -96,7 +95,10 @@ bool inspect(const QStringList &args, State &state) | |||
96 | state.printError("Read invalid buffer from disk: " + key); | 95 | state.printError("Read invalid buffer from disk: " + key); |
97 | } else { | 96 | } else { |
98 | const auto metadata = flatbuffers::GetRoot<Sink::Metadata>(buffer.metadataBuffer()); | 97 | const auto metadata = flatbuffers::GetRoot<Sink::Metadata>(buffer.metadataBuffer()); |
99 | state.printLine("Key: " + key + " Operation: " + QString::number(metadata->operation())); | 98 | state.printLine("Key: " + key |
99 | + " Operation: " + QString::number(metadata->operation()) | ||
100 | + " Replay: " + (metadata->replayToSource() ? "true" : "false") | ||
101 | + ((metadata->modifiedProperties() && metadata->modifiedProperties()->size() != 0) ? (" Changeset: " + Sink::BufferUtils::fromVector(*metadata->modifiedProperties()).join(",")) : "")); | ||
100 | } | 102 | } |
101 | } else { | 103 | } else { |
102 | state.printLine("Key: " + key + " Value: " + QString::fromUtf8(data)); | 104 | state.printLine("Key: " + key + " Value: " + QString::fromUtf8(data)); |