java/sql-dk/src/main/java/info/globalcode/sql/dk/CLIParser.java
branchv_0
changeset 246 277c18b48762
parent 238 4a1864c3e867
child 250 aae5009bd0af
     1.1 --- a/java/sql-dk/src/main/java/info/globalcode/sql/dk/CLIParser.java	Tue Mar 05 21:22:33 2019 +0100
     1.2 +++ b/java/sql-dk/src/main/java/info/globalcode/sql/dk/CLIParser.java	Tue Mar 05 22:03:02 2019 +0100
     1.3 @@ -28,9 +28,8 @@
     1.4  import java.util.Map;
     1.5  
     1.6  /**
     1.7 - * Converts command line arguments from String array to object.
     1.8 - * Checks basic constraints (if only supported options are used and if they have correct number of
     1.9 - * parameters)
    1.10 + * Converts command line arguments from String array to object. Checks basic constraints (if only
    1.11 + * supported options are used and if they have correct number of parameters)
    1.12   *
    1.13   * @author Ing. František Kučera (frantovo.cz)
    1.14   */
    1.15 @@ -111,6 +110,9 @@
    1.16  						options.addNamedParameter(new NamedParameter(paramName, paramValue, namedTypes.get(paramName)));
    1.17  					}
    1.18  					break;
    1.19 +				case Tokens.RELATION:
    1.20 +					options.addRelationName(fetchNext(args, ++i));
    1.21 +					break;
    1.22  				case Tokens.FORMATTER:
    1.23  					options.setFormatterName(fetchNext(args, ++i));
    1.24  					break;
    1.25 @@ -187,6 +189,7 @@
    1.26  		public static final String NAME_PREFIX = "--name-prefix"; // bash-completion:option // help: parameter name prefix – regular expression
    1.27  		public static final String NAME_SUFFIX = "--name-suffix"; // bash-completion:option // help: parameter name suffix – regular expression
    1.28  		public static final String TYPES = "--types"; // bash-completion:option // help: comma separated list of parameter types
    1.29 +		public static final String RELATION = "--relation"; // bash-completion:option // help: name of the output relation (result set)
    1.30  		public static final String FORMATTER = "--formatter"; // bash-completion:option // help: name of the output formatter
    1.31  		public static final String FORMATTER_PROPERTY = "--formatter-property"; // bash-completion:option // help: name and value
    1.32  		public static final String INFO_HELP = "--help"; // bash-completion:option // help: print this help