src/CLIParser.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 28 Aug 2022 18:03:13 +0200
branchv_0
changeset 59 a1775ba6d056
parent 54 bc6e11cccdf4
permissions -rw-r--r--
optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes) examples, shortcuts: relpipe-tr-unionall() { relpipe-tr-sql --copy '.+' --on-duplicate-relation insert; } # does UNION ALL for all tables with same name (including already existing ones – when non-empty database is used) relpipe-tr-unionall() { relpipe-tr-serialize | relpipe-tr-deserialize; } # does UNION ALL only for tables with same name immediately following each other (interleaved duplicates will stay unaffected)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
10
7da7173d84b0 fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents: 5
diff changeset
     7
 * the Free Software Foundation, version 3.
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <vector>
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
#include <relpipe/writer/typedefs.h>
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <relpipe/cli/CLI.h>
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
#include <relpipe/cli/RelpipeCLIException.h>
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
#include "Configuration.h"
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace relpipe {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
namespace tr {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
namespace sql {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
class CLIParser {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
private:
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	// FIXME: move common methods/classes to relpipe-lib-cli or relpipe-lib-helper
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
	string_t readNext(std::vector<string_t> arguments, int& i) {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
		if (i < arguments.size()) return arguments[i++];
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
		else throw relpipe::cli::RelpipeCLIException(L"Missing CLI argument" + (i > 0 ? (L" after " + arguments[i - 1]) : L""), relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
54
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    41
	/**
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    42
	 * TODO: use a common method
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    43
	 */
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    44
	bool parseBoolean(const string_t& value) {
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    45
		if (value == L"true") return true;
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    46
		else if (value == L"false") return false;
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    47
		else throw relpipe::cli::RelpipeCLIException(L"Unable to parse boolean value: " + value + L" (expecting true or false)", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    48
	}
59
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    49
	
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    50
	OnDuplicateRelation parseOnDuplicateRelation(const string_t& value) {
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    51
		if (value == L"insert") return OnDuplicateRelation::Insert;
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    52
		else if (value == L"fail") return OnDuplicateRelation::Fail;
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    53
		else throw relpipe::cli::RelpipeCLIException(L"Unable to parse OnDuplicateRelation value: " + value + L" (expecting fail or insert)", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    54
	}
54
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    55
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    56
	void addQuery(Configuration& c, Statement& currentQuery) {
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    57
		if (currentQuery.sql.size()) {
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    58
			c.statements.push_back(currentQuery);
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    59
			currentQuery = Statement();
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    60
		}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    61
	}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    62
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    63
public:
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    64
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    65
	static const string_t OPTION_RELATION;
24
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    66
	static const string_t OPTION_TYPE_CAST;
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    67
	static const string_t OPTION_PARAMETER;
59
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    68
	static const string_t OPTION_ON_DUPLICATE_RELATION;
16
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    69
	static const string_t OPTION_COPY;
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    70
	static const string_t OPTION_COPY_RENAMED;
37
3de41719d7eb add options --data-source-name and --data-source-url for custom datasource; drop options --file and --file-keep
František Kučera <franta-hg@frantovo.cz>
parents: 34
diff changeset
    71
	static const string_t OPTION_DATA_SOURCE_NAME;
47
428c278af4be rename option --data-source-url to --data-source-string
František Kučera <franta-hg@frantovo.cz>
parents: 37
diff changeset
    72
	static const string_t OPTION_DATA_SOURCE_STRING;
34
24c05e69d68f add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents: 24
diff changeset
    73
	static const string_t OPTION_LIST_DATA_SOURCES;
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    74
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    75
	Configuration parse(const std::vector<string_t>& arguments) {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    76
		Configuration c;
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    77
		Statement currentQuery;
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    78
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    79
		for (int i = 0; i < arguments.size();) {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    80
			string_t option = readNext(arguments, i);
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    81
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    82
			if (option == OPTION_RELATION) {
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    83
				addQuery(c, currentQuery); // previous relation
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    84
				currentQuery.relation = readNext(arguments, i);
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    85
				currentQuery.sql = readNext(arguments, i);
24
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    86
			} else if (option == OPTION_TYPE_CAST) {
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    87
				TypeCast typeCast;
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    88
				typeCast.name = readNext(arguments, i);
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    89
				typeCast.type = readNext(arguments, i);
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
    90
				currentQuery.typeCasts.push_back(typeCast);
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    91
			} else if (option == OPTION_PARAMETER) {
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    92
				Parameter parameter;
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    93
				parameter.value = readNext(arguments, i);
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    94
				currentQuery.parameters.push_back(parameter);
59
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    95
			} else if (option == OPTION_ON_DUPLICATE_RELATION) {
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
    96
				c.onDuplicateRelation = parseOnDuplicateRelation(readNext(arguments, i));
16
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    97
			} else if (option == OPTION_COPY) {
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    98
				c.copyRelations.push_back({readNext(arguments, i), L"", false});
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    99
			} else if (option == OPTION_COPY_RENAMED) {
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
   100
				c.copyRelations.push_back({readNext(arguments, i), readNext(arguments, i), true});
37
3de41719d7eb add options --data-source-name and --data-source-url for custom datasource; drop options --file and --file-keep
František Kučera <franta-hg@frantovo.cz>
parents: 34
diff changeset
   101
			} else if (option == OPTION_DATA_SOURCE_NAME) {
3de41719d7eb add options --data-source-name and --data-source-url for custom datasource; drop options --file and --file-keep
František Kučera <franta-hg@frantovo.cz>
parents: 34
diff changeset
   102
				c.dataSourceName = readNext(arguments, i);
47
428c278af4be rename option --data-source-url to --data-source-string
František Kučera <franta-hg@frantovo.cz>
parents: 37
diff changeset
   103
			} else if (option == OPTION_DATA_SOURCE_STRING) {
428c278af4be rename option --data-source-url to --data-source-string
František Kučera <franta-hg@frantovo.cz>
parents: 37
diff changeset
   104
				c.dataSourceString = readNext(arguments, i);
34
24c05e69d68f add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents: 24
diff changeset
   105
			} else if (option == OPTION_LIST_DATA_SOURCES) {
54
bc6e11cccdf4 add boolean parameter to --list-data-sources + allow listing and SELECTing at the same time
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
   106
				c.listDataSources = parseBoolean(readNext(arguments, i));
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   107
			} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   108
		}
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   109
		addQuery(c, currentQuery); // last relation
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   110
47
428c278af4be rename option --data-source-url to --data-source-string
František Kučera <franta-hg@frantovo.cz>
parents: 37
diff changeset
   111
		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);
37
3de41719d7eb add options --data-source-name and --data-source-url for custom datasource; drop options --file and --file-keep
František Kučera <franta-hg@frantovo.cz>
parents: 34
diff changeset
   112
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   113
		return c;
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   114
	}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   115
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   116
	virtual ~CLIParser() {
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   117
	}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   118
};
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   119
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   120
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   121
// relpipe-tr-sql --relation "tabulka" "SELECT * FROM fstab WHERE id = ?" --parameter "123"
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   122
// TODO: --type string/integer/boolean (default is string)
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   123
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   124
const string_t CLIParser::OPTION_RELATION = L"--relation";
24
884ece10575d add --type-cast to allow explicit specification of type for given output attributes
František Kučera <franta-hg@frantovo.cz>
parents: 17
diff changeset
   125
const string_t CLIParser::OPTION_TYPE_CAST = L"--type-cast";
2
362f2689cb87 configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
   126
const string_t CLIParser::OPTION_PARAMETER = L"--parameter";
59
a1775ba6d056 optional UNION ALL: CLI option '--on-duplicate-relation' with values 'fail' and 'insert' (later more modes)
František Kučera <franta-hg@frantovo.cz>
parents: 54
diff changeset
   127
const string_t CLIParser::OPTION_ON_DUPLICATE_RELATION = L"--on-duplicate-relation";
16
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
   128
const string_t CLIParser::OPTION_COPY = L"--copy";
3c51a2c32c86 rename --dump to --copy + add option --copy-renamed + allow multiple copy/copy-renamed commands
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
   129
const string_t CLIParser::OPTION_COPY_RENAMED = L"--copy-renamed";
34
24c05e69d68f add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents: 24
diff changeset
   130
const string_t CLIParser::OPTION_LIST_DATA_SOURCES = L"--list-data-sources";
37
3de41719d7eb add options --data-source-name and --data-source-url for custom datasource; drop options --file and --file-keep
František Kučera <franta-hg@frantovo.cz>
parents: 34
diff changeset
   131
const string_t CLIParser::OPTION_DATA_SOURCE_NAME = L"--data-source-name";
47
428c278af4be rename option --data-source-url to --data-source-string
František Kučera <franta-hg@frantovo.cz>
parents: 37
diff changeset
   132
const string_t CLIParser::OPTION_DATA_SOURCE_STRING = L"--data-source-string";
0
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   133
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   134
}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   135
}
c205f5d06418 project skeleton
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   136
}