You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
583B

  1. /** zstreedb2 args.hpp
  2. (C) 2018 Erik Zscheile
  3. License: GPLv2
  4. **/
  5. #pragma once
  6. #include <string>
  7. #include <vector>
  8. #include <rocksdb/options.h>
  9. namespace ztdb {
  10. struct args_t final {
  11. rocksdb::CompressionType compress;
  12. enum { UNKNOWN, GET, SET, LS, MV, RM, MATCH, PRINT } cmd;
  13. //std::string sel_ns;
  14. std::string sel_node;
  15. std::vector<std::string> cmd_args;
  16. bool parse(int argc, char *argv[]);
  17. // flag_use_ro: detects if the command can work on
  18. // a read-only database
  19. bool flag_use_ro() const noexcept;
  20. };
  21. void usage() noexcept;
  22. void help() noexcept;
  23. }