--- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Sat Aug 15 10:53:35 2015 +0200
+++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java Sat Aug 15 11:07:50 2015 +0200
@@ -177,12 +177,32 @@
}
}
- private void listFormatterProperties() {
- for (String name : options.getFormatterNamesToListProperties()) {
- log.log(Level.SEVERE, "TODO: list formatter properties for {0}", name);
+ private void listFormatterProperties() throws FormatterException, ConfigurationException {
+ for (String formatterName : options.getFormatterNamesToListProperties()) {
+ listFormatterProperties(formatterName);
}
}
+ private void listFormatterProperties(String formatterName) throws FormatterException, ConfigurationException {
+ ColumnsHeader header = constructHeader(
+ new HeaderField("name", SQLType.VARCHAR),
+ new HeaderField("type", SQLType.VARCHAR),
+ new HeaderField("default", SQLType.VARCHAR),
+ new HeaderField("description", SQLType.VARCHAR)
+ );
+ List<Object[]> data = new ArrayList<>();
+
+ data.add(new Object[]{"TODO", "a", "b", "c"});
+ data.add(new Object[]{"TODO", "a", "b", "c"});
+ data.add(new Object[]{"TODO", "a", "b", "c"});
+ data.add(new Object[]{"TODO", "a", "b", "c"});
+
+ List<Parameter> parameters = new ArrayList<>();
+ parameters.add(new NamedParameter("formatter", formatterName, SQLType.VARCHAR));
+
+ printTable(formatter, header, "-- formatter properties", parameters, data);
+ }
+
private void listTypes() throws FormatterException, ConfigurationException {
ColumnsHeader header = constructHeader(new HeaderField("name", SQLType.VARCHAR), new HeaderField("code", SQLType.INTEGER));
List<Object[]> data = new ArrayList<>();