java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java
branchv_0
changeset 74 a8444f6a54f3
parent 73 d32fd50d3c2c
child 75 43aa4625ab7e
--- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Thu Dec 26 22:32:06 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Thu Dec 26 22:39:38 2013 +0100
@@ -61,7 +61,7 @@
 
 		for (InfoType infoType : commands) {
 			switch (infoType) {
-				// only these needs formatted output
+				// only these need formatted output
 				case CONNECTION:
 				case DATABASES:
 				case FORMATTERS:
@@ -135,14 +135,13 @@
 	public void testConnection() throws FormatterException, ConfigurationException {
 		ColumnsHeader header = constructHeader(
 				new HeaderField("database_name", SQLType.VARCHAR),
-				new HeaderField("configured", SQLType.VARCHAR),
-				new HeaderField("connected", SQLType.VARCHAR));
+				new HeaderField("configured", SQLType.BOOLEAN),
+				new HeaderField("connected", SQLType.BOOLEAN));
 		List<Object[]> data = new ArrayList<>();
 
-		/** TODO: support multiple DB to test */
-		String dbName = options.getDatabaseNameToTest();
-
-		data.add(testConnection(dbName));
+		for (String dbName : options.getDatabaseNameToTest()) {
+			data.add(testConnection(dbName));
+		}
 
 		printTable(formatter, header, data);
 	}