|
- /** zstreedb2 args.hpp
- (C) 2018 Erik Zscheile
- License: GPLv2
- **/
-
- #pragma once
- #include <string>
- #include <vector>
- #include <rocksdb/options.h>
-
- namespace ztdb {
-
- struct args_t final {
- rocksdb::CompressionType compress;
- enum { UNKNOWN, GET, SET, LS, MV, RM, MATCH, PRINT } cmd;
- //std::string sel_ns;
- std::string sel_node;
- std::vector<std::string> cmd_args;
-
- bool parse(int argc, char *argv[]);
-
- // flag_use_ro: detects if the command can work on
- // a read-only database
- bool flag_use_ro() const noexcept;
- };
-
- void usage() noexcept;
- void help() noexcept;
-
- }
|