int colNum = 0;
boolean anyDescription = false;
if (rset != null) {
while (!_interrupted && rset.next()) {
final Column[] row = new Column[9];
row[0] = new Column(++colNum);
final String thisTabName = rset.getString(3);
row[1] = new Column(thisTabName);
allSameTableName &= tabName.equals(thisTabName);
final String colname = rset.getString(4);
if (doubleCheck.contains(colname)) {
continue;
}
doubleCheck.add(colname);
row[2] = new Column(colname);
String type = rset.getString(6);
final int colSize = rset.getInt(7);
final int colDp = rset.getInt(9);
if (colSize > 0) {
if (colDp == 0) {
type = type + "(" + colSize +")";
} else {
type = type + "(" + colSize + "," + colDp + ")";
}
}
row[3] = new Column(type);
final String defaultVal = rset.getString(13);
row[4] = new Column(rset.getString(18));
// oracle appends newline to default values for some
// reason.
row[5] = new Column((defaultVal != null ? defaultVal.trim() : null));
final String pkdesc = pks.get(colname);
row[6] = new Column(pkdesc != null ? pkdesc : "");
final String fkdesc = fks.get(colname);
row[7] = new Column(fkdesc != null ? fkdesc : "");
final String colDesc = showDescriptions ? rset.getString(12) : null;
row[8] = new Column(colDesc);
anyDescription |= colDesc != null;
rows.add(row);
}
}
rset.close();