--- a/src/CLIParser.h Thu Jul 28 02:45:11 2022 +0200
+++ b/src/CLIParser.h Fri Jul 29 18:03:49 2022 +0200
@@ -49,8 +49,8 @@
public:
static const relpipe::common::type::StringX OPTION_RELATION;
- static const relpipe::common::type::StringX OPTION_UNLINK_ON_CLOSE;
- static const relpipe::common::type::StringX OPTION_QUEUE;
+ static const relpipe::common::type::StringX OPTION_CONNECTION_STRING;
+ static const relpipe::common::type::StringX OPTION_CONNECTION_OPTION;
Configuration parse(const std::vector<relpipe::common::type::StringX>& arguments) {
Configuration c;
@@ -60,10 +60,12 @@
if (option == OPTION_RELATION) {
c.relation = readNext(arguments, i);
- } else if (option == OPTION_UNLINK_ON_CLOSE) {
- c.unlinkOnClose = parseBoolean(readNext(arguments, i));
- } else if (option == OPTION_QUEUE) {
- c.queue = readNext(arguments, i);
+ } else if (option == OPTION_CONNECTION_STRING) {
+ c.connectionString = readNext(arguments, i);
+ } else if (option == OPTION_CONNECTION_OPTION) {
+ auto name = readNext(arguments, i);
+ auto value = readNext(arguments, i);
+ c.options.push_back({name, value});
} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
}
@@ -75,8 +77,8 @@
};
const relpipe::common::type::StringX CLIParser::OPTION_RELATION = L"--relation";
-const relpipe::common::type::StringX CLIParser::OPTION_UNLINK_ON_CLOSE = L"--unlink-on-close";
-const relpipe::common::type::StringX CLIParser::OPTION_QUEUE = L"--queue";
+const relpipe::common::type::StringX CLIParser::OPTION_CONNECTION_STRING = L"--connection-string";
+const relpipe::common::type::StringX CLIParser::OPTION_CONNECTION_OPTION = L"--connection-option";
}
}