--- a/src/CLIParser.h Fri Dec 13 22:19:41 2019 +0100
+++ b/src/CLIParser.h Sat Dec 14 14:00:36 2019 +0100
@@ -48,6 +48,7 @@
public:
static const string_t OPTION_RELATION;
+ static const string_t OPTION_TYPE_CAST;
static const string_t OPTION_PARAMETER;
static const string_t OPTION_COPY;
static const string_t OPTION_COPY_RENAMED;
@@ -65,6 +66,11 @@
addQuery(c, currentQuery); // previous relation
currentQuery.relation = readNext(arguments, i);
currentQuery.sql = readNext(arguments, i);
+ } else if (option == OPTION_TYPE_CAST) {
+ TypeCast typeCast;
+ typeCast.name = readNext(arguments, i);
+ typeCast.type = readNext(arguments, i);
+ currentQuery.typeCasts.push_back(typeCast);
} else if (option == OPTION_PARAMETER) {
Parameter parameter;
parameter.value = readNext(arguments, i);
@@ -97,6 +103,7 @@
// TODO: --type string/integer/boolean (default is string)
const string_t CLIParser::OPTION_RELATION = L"--relation";
+const string_t CLIParser::OPTION_TYPE_CAST = L"--type-cast";
const string_t CLIParser::OPTION_PARAMETER = L"--parameter";
const string_t CLIParser::OPTION_COPY = L"--copy";
const string_t CLIParser::OPTION_COPY_RENAMED = L"--copy-renamed";