java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java
branchv_0
changeset 107 8189a4a28cd8
parent 99 b969176512dd
child 155 eb3676c6929b
--- a/java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java	Wed Jan 01 01:06:38 2014 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java	Wed Jan 01 02:44:29 2014 +0100
@@ -18,6 +18,7 @@
 package info.globalcode.sql.dk;
 
 import info.globalcode.sql.dk.InfoLister.InfoType;
+import info.globalcode.sql.dk.configuration.Property;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -100,6 +101,12 @@
 				case Tokens.FORMATTER:
 					options.setFormatterName(fetchNext(args, ++i));
 					break;
+				case Tokens.DB_PROPERTY:
+					options.addDatabaseProperty(new Property(fetchNext(args, ++i), fetchNext(args, ++i)));
+					break;
+				case Tokens.FORMATTER_PROPERTY:
+					options.addFormatterProperty(new Property(fetchNext(args, ++i), fetchNext(args, ++i)));
+					break;
 				case Tokens.INFO_HELP:
 					options.addShowInfo(InfoType.HELP);
 					break;
@@ -141,6 +148,7 @@
 
 		// bash-completion:options:
 		public static final String DB = "--db"; // bash-completion:option // help: database name
+		public static final String DB_PROPERTY = "--db-property"; // bash-completion:option // help: name and value
 		public static final String SQL = "--sql"; // bash-completion:option // help: SQL query/command
 		public static final String BATCH = "--batch"; // bash-completion:option // help: batch mode (no argument)
 		public static final String DATA = "--data"; // bash-completion:option // help: list of ordinal parameters
@@ -149,6 +157,7 @@
 		public static final String NAME_SUFFIX = "--name-suffix"; // bash-completion:option // help: parameter name suffix – regular expression
 		public static final String TYPES = "--types"; // bash-completion:option // help: comma separated list of parameter types
 		public static final String FORMATTER = "--formatter"; // bash-completion:option // help: name of the output formatter
+		public static final String FORMATTER_PROPERTY = "--formatter-property"; // bash-completion:option // help: name and value
 		public static final String INFO_HELP = "--help"; // bash-completion:option // help: print this help
 		public static final String INFO_VERSION = "--version"; // bash-completion:option // help: print version info
 		public static final String INFO_LICENSE = "--license"; // bash-completion:option // help: print license