MCPcopy Create free account
hub / github.com/apple/foundationdb / initHelp

Function initHelp

fdbcli/fdbcli.actor.cpp:494–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492std::set<std::string>& hiddenCommands = CommandFactory::hiddenCommands();
493
494void initHelp() {
495 helpMap["begin"] =
496 CommandHelp("begin",
497 "begin a new transaction",
498 "By default, the fdbcli operates in autocommit mode. All operations are performed in their own "
499 "transaction, and are automatically committed for you. By explicitly beginning a transaction, "
500 "successive operations are all performed as part of a single transaction.\n\nTo commit the "
501 "transaction, use the commit command. To discard the transaction, use the reset command.");
502 helpMap["commit"] = CommandHelp("commit",
503 "commit the current transaction",
504 "Any sets or clears executed after the start of the current transaction will be "
505 "committed to the database. On success, the committed version number is displayed. "
506 "If commit fails, the error is displayed and the transaction must be retried.");
507 helpMap["clear"] = CommandHelp(
508 "clear <KEY>",
509 "clear a key from the database",
510 "Clear succeeds even if the specified key is not present, but may fail because of conflicts." ESCAPINGK);
511 helpMap["clearrange"] = CommandHelp(
512 "clearrange <BEGINKEY> <ENDKEY>",
513 "clear a range of keys from the database",
514 "All keys between BEGINKEY (inclusive) and ENDKEY (exclusive) are cleared from the database. This command will "
515 "succeed even if the specified range is empty, but may fail because of conflicts." ESCAPINGK);
516 helpMap["exit"] = CommandHelp("exit", "exit the CLI", "");
517 helpMap["quit"] = CommandHelp();
518 helpMap["waitconnected"] = CommandHelp();
519 helpMap["waitopen"] = CommandHelp();
520 helpMap["sleep"] = CommandHelp("sleep <SECONDS>", "sleep for a period of time", "");
521 helpMap["get"] =
522 CommandHelp("get <KEY>",
523 "fetch the value for a given key",
524 "Displays the value of KEY in the database, or `not found' if KEY is not present." ESCAPINGK);
525 helpMap["getrange"] =
526 CommandHelp("getrange <BEGINKEY> [ENDKEY] [LIMIT]",
527 "fetch key/value pairs in a range of keys",
528 "Displays up to LIMIT keys and values for keys between BEGINKEY (inclusive) and ENDKEY "
529 "(exclusive). If ENDKEY is omitted, then the range will include all keys starting with BEGINKEY. "
530 "LIMIT defaults to 25 if omitted." ESCAPINGK);
531 helpMap["getrangekeys"] = CommandHelp(
532 "getrangekeys <BEGINKEY> [ENDKEY] [LIMIT]",
533 "fetch keys in a range of keys",
534 "Displays up to LIMIT keys for keys between BEGINKEY (inclusive) and ENDKEY (exclusive). If ENDKEY is omitted, "
535 "then the range will include all keys starting with BEGINKEY. LIMIT defaults to 25 if omitted." ESCAPINGK);
536 helpMap["getversion"] =
537 CommandHelp("getversion",
538 "Fetch the current read version",
539 "Displays the current read version of the database or currently running transaction.");
540 helpMap["quota"] =
541 CommandHelp("quota",
542 "quota [get <tag> [reserved|total] [read|write]|set <tag> [reserved|total] [read|write] <value>]",
543 "Get or modify the throughput quota for the specified tag.");
544 helpMap["reset"] =
545 CommandHelp("reset",
546 "reset the current transaction",
547 "Any sets or clears executed after the start of the active transaction will be discarded.");
548 helpMap["rollback"] = CommandHelp("rollback",
549 "rolls back the current transaction",
550 "The active transaction will be discarded, including any sets or clears executed "
551 "since the transaction was started.");

Callers 1

mainFunction · 0.85

Calls 1

CommandHelpClass · 0.85

Tested by

no test coverage detected