java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java
branchv_0
changeset 107 8189a4a28cd8
parent 99 b969176512dd
child 155 eb3676c6929b
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java	Wed Jan 01 01:06:38 2014 +0100
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java	Wed Jan 01 02:44:29 2014 +0100
     1.3 @@ -18,6 +18,7 @@
     1.4  package info.globalcode.sql.dk;
     1.5  
     1.6  import info.globalcode.sql.dk.InfoLister.InfoType;
     1.7 +import info.globalcode.sql.dk.configuration.Property;
     1.8  import java.util.ArrayList;
     1.9  import java.util.HashMap;
    1.10  import java.util.List;
    1.11 @@ -100,6 +101,12 @@
    1.12  				case Tokens.FORMATTER:
    1.13  					options.setFormatterName(fetchNext(args, ++i));
    1.14  					break;
    1.15 +				case Tokens.DB_PROPERTY:
    1.16 +					options.addDatabaseProperty(new Property(fetchNext(args, ++i), fetchNext(args, ++i)));
    1.17 +					break;
    1.18 +				case Tokens.FORMATTER_PROPERTY:
    1.19 +					options.addFormatterProperty(new Property(fetchNext(args, ++i), fetchNext(args, ++i)));
    1.20 +					break;
    1.21  				case Tokens.INFO_HELP:
    1.22  					options.addShowInfo(InfoType.HELP);
    1.23  					break;
    1.24 @@ -141,6 +148,7 @@
    1.25  
    1.26  		// bash-completion:options:
    1.27  		public static final String DB = "--db"; // bash-completion:option // help: database name
    1.28 +		public static final String DB_PROPERTY = "--db-property"; // bash-completion:option // help: name and value
    1.29  		public static final String SQL = "--sql"; // bash-completion:option // help: SQL query/command
    1.30  		public static final String BATCH = "--batch"; // bash-completion:option // help: batch mode (no argument)
    1.31  		public static final String DATA = "--data"; // bash-completion:option // help: list of ordinal parameters
    1.32 @@ -149,6 +157,7 @@
    1.33  		public static final String NAME_SUFFIX = "--name-suffix"; // bash-completion:option // help: parameter name suffix – regular expression
    1.34  		public static final String TYPES = "--types"; // bash-completion:option // help: comma separated list of parameter types
    1.35  		public static final String FORMATTER = "--formatter"; // bash-completion:option // help: name of the output formatter
    1.36 +		public static final String FORMATTER_PROPERTY = "--formatter-property"; // bash-completion:option // help: name and value
    1.37  		public static final String INFO_HELP = "--help"; // bash-completion:option // help: print this help
    1.38  		public static final String INFO_VERSION = "--version"; // bash-completion:option // help: print version info
    1.39  		public static final String INFO_LICENSE = "--license"; // bash-completion:option // help: print license