src/CLIParser.h
branchv_0
changeset 47 428c278af4be
parent 37 3de41719d7eb
child 54 bc6e11cccdf4
--- a/src/CLIParser.h	Thu Jun 04 00:03:37 2020 +0200
+++ b/src/CLIParser.h	Thu Jun 04 00:46:00 2020 +0200
@@ -53,7 +53,7 @@
 	static const string_t OPTION_COPY;
 	static const string_t OPTION_COPY_RENAMED;
 	static const string_t OPTION_DATA_SOURCE_NAME;
-	static const string_t OPTION_DATA_SOURCE_URL;
+	static const string_t OPTION_DATA_SOURCE_STRING;
 	static const string_t OPTION_LIST_DATA_SOURCES;
 
 	Configuration parse(const std::vector<string_t>& arguments) {
@@ -82,15 +82,15 @@
 				c.copyRelations.push_back({readNext(arguments, i), readNext(arguments, i), true});
 			} else if (option == OPTION_DATA_SOURCE_NAME) {
 				c.dataSourceName = readNext(arguments, i);
-			} else if (option == OPTION_DATA_SOURCE_URL) {
-				c.dataSourceURL = readNext(arguments, i);
+			} else if (option == OPTION_DATA_SOURCE_STRING) {
+				c.dataSourceString = readNext(arguments, i);
 			} else if (option == OPTION_LIST_DATA_SOURCES) {
 				c.listDataSources = true;
 			} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
 		}
 		addQuery(c, currentQuery); // last relation
 
-		if (c.dataSourceName.size() && c.dataSourceURL.size()) throw relpipe::cli::RelpipeCLIException(L"Specify data source name or data source URL, not both.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
+		if (c.dataSourceName.size() && c.dataSourceString.size()) throw relpipe::cli::RelpipeCLIException(L"Specify data source name or data source string, not both.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
 
 		return c;
 	}
@@ -110,7 +110,7 @@
 const string_t CLIParser::OPTION_COPY_RENAMED = L"--copy-renamed";
 const string_t CLIParser::OPTION_LIST_DATA_SOURCES = L"--list-data-sources";
 const string_t CLIParser::OPTION_DATA_SOURCE_NAME = L"--data-source-name";
-const string_t CLIParser::OPTION_DATA_SOURCE_URL = L"--data-source-url";
+const string_t CLIParser::OPTION_DATA_SOURCE_STRING = L"--data-source-string";
 
 }
 }