java/sql-dk/src/info/globalcode/sql/dk/CLIParser.java
branchv_0
changeset 15 bbd335b5410c
parent 14 189b1260b942
child 16 5b8fcd35d4d6
equal deleted inserted replaced
14:189b1260b942 15:bbd335b5410c
   112 					options.addShowInfo(CLIOptions.INFO_TYPE.TYPES);
   112 					options.addShowInfo(CLIOptions.INFO_TYPE.TYPES);
   113 					break;
   113 					break;
   114 				case Tokens.INFO_VERSION:
   114 				case Tokens.INFO_VERSION:
   115 					options.addShowInfo(CLIOptions.INFO_TYPE.VERSION);
   115 					options.addShowInfo(CLIOptions.INFO_TYPE.VERSION);
   116 					break;
   116 					break;
       
   117 				case Tokens.INFO_DATABASES:
       
   118 					options.addShowInfo(CLIOptions.INFO_TYPE.DATABASES);
       
   119 					break;
       
   120 				case Tokens.INFO_CONNECTION:
       
   121 					options.addShowInfo(CLIOptions.INFO_TYPE.CONNECTION);
       
   122 					options.setDatabaseNameToTest(fetchNext(args, ++i));
       
   123 					break;
   117 				default:
   124 				default:
   118 					throw new CLIParserException("Unknown option: " + arg);
   125 					throw new CLIParserException("Unknown option: " + arg);
   119 			}
   126 			}
   120 		}
   127 		}
   121 		return options;
   128 		return options;
   143 		public static final String INFO_HELP = "--help";
   150 		public static final String INFO_HELP = "--help";
   144 		public static final String INFO_VERSION = "--version";
   151 		public static final String INFO_VERSION = "--version";
   145 		public static final String INFO_LICENSE = "--license";
   152 		public static final String INFO_LICENSE = "--license";
   146 		public static final String INFO_FORMATTERS = "--list-formatters";
   153 		public static final String INFO_FORMATTERS = "--list-formatters";
   147 		public static final String INFO_TYPES = "--list-types";
   154 		public static final String INFO_TYPES = "--list-types";
       
   155 		public static final String INFO_DATABASES = "--list-databases";
       
   156 		public static final String INFO_CONNECTION = "--test-connection";
   148 
   157 
   149 		private Tokens() {
   158 		private Tokens() {
   150 		}
   159 		}
   151 	}
   160 	}
   152 
   161