--- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Sat Aug 15 10:44:36 2015 +0200
+++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Sat Aug 15 10:47:56 2015 +0200
@@ -176,6 +176,12 @@
}
}
+ private void listFormatterProperties() {
+ for (String name : options.getFormatterNamesToListProperties()) {
+ log.log(Level.SEVERE, "TODO: list formatter properties for {0}", name);
+ }
+ }
+
public void listTypes() throws FormatterException, ConfigurationException {
ColumnsHeader header = constructHeader(new HeaderField("name", SQLType.VARCHAR), new HeaderField("code", SQLType.INTEGER));
List<Object[]> data = new ArrayList<>();
@@ -346,16 +352,13 @@
}
for (final String dbName : options.getDatabaseNamesToTest()) {
- es.submit(new Runnable() {
- // TODO: Java 8 – lambda
- @Override
- public void run() {
- final Object[] row = testConnection(dbName);
- synchronized (currentFormatter) {
- printRow(currentFormatter, row);
- }
+ es.submit(() -> {
+ final Object[] row = testConnection(dbName);
+ synchronized (currentFormatter) {
+ printRow(currentFormatter, row);
}
- });
+ }
+ );
}
es.shutdown();
@@ -565,6 +568,12 @@
infoLister.listFormatters();
}
},
+ FORMATTER_PROPERTIES {
+ @Override
+ public void showInfo(InfoLister infoLister) throws FormatterException, ConfigurationException {
+ infoLister.listFormatterProperties();
+ }
+ },
TYPES {
@Override
public void showInfo(InfoLister infoLister) throws FormatterException, ConfigurationException {