java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java
branchv_0
changeset 74 a8444f6a54f3
parent 73 d32fd50d3c2c
child 75 43aa4625ab7e
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Thu Dec 26 22:32:06 2013 +0100
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Thu Dec 26 22:39:38 2013 +0100
     1.3 @@ -61,7 +61,7 @@
     1.4  
     1.5  		for (InfoType infoType : commands) {
     1.6  			switch (infoType) {
     1.7 -				// only these needs formatted output
     1.8 +				// only these need formatted output
     1.9  				case CONNECTION:
    1.10  				case DATABASES:
    1.11  				case FORMATTERS:
    1.12 @@ -135,14 +135,13 @@
    1.13  	public void testConnection() throws FormatterException, ConfigurationException {
    1.14  		ColumnsHeader header = constructHeader(
    1.15  				new HeaderField("database_name", SQLType.VARCHAR),
    1.16 -				new HeaderField("configured", SQLType.VARCHAR),
    1.17 -				new HeaderField("connected", SQLType.VARCHAR));
    1.18 +				new HeaderField("configured", SQLType.BOOLEAN),
    1.19 +				new HeaderField("connected", SQLType.BOOLEAN));
    1.20  		List<Object[]> data = new ArrayList<>();
    1.21  
    1.22 -		/** TODO: support multiple DB to test */
    1.23 -		String dbName = options.getDatabaseNameToTest();
    1.24 -
    1.25 -		data.add(testConnection(dbName));
    1.26 +		for (String dbName : options.getDatabaseNameToTest()) {
    1.27 +			data.add(testConnection(dbName));
    1.28 +		}
    1.29  
    1.30  		printTable(formatter, header, data);
    1.31  	}