}
}
}
private ShellTable printResult(ResultSet rs) throws SQLException {
ShellTable table = new ShellTable();
ResultSetMetaData meta = rs.getMetaData();
for (int c = 1; c <= meta.getColumnCount(); c++) {
table.header.add(meta.getColumnLabel(c));
}
while (rs.next()) {
List<String> row = table.addRow();
for (int c = 1; c <= meta.getColumnCount(); c++) {
row.add(rs.getString(c));
}
}
return table;