13 const std::string &command,
14 std::istream ¶meters,
19 if (command ==
"help")
23 timestamp [<stamp>] (if no value is given, use current time)
24 comment "<comment_string>"
29 write_blob <data_string>
35 else if (command ==
"comment")
37 const std::string comment =
read_string(parameters);
38 writable.comment(comment);
40 else if (command ==
"timestamp")
42 int64_t timestamp = 0;
43 parameters >> timestamp;
44 if (parameters.fail())
45 timestamp = std::time(
nullptr);
46 writable.timestamp(timestamp);
48 else if (command ==
"valid_data")
50 writable.valid_data();
52 else if (command ==
"flush")
56 else if (command ==
"soft_checkpoint" || command ==
"checkpoint")
58 writable.soft_checkpoint();
60 else if (command ==
"hard_checkpoint")
62 writable.hard_checkpoint();
64 else if (command ==
"write_blob")
67 const Blob blob = blob_writer.write_blob(value);
72 return Status::not_found;
void write_blob(std::ostream &out, Blob blob)
std::string read_string(std::istream &in)