Skip to content

Commit

Permalink
Use buffer_length if it's available.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Aug 29, 2006
1 parent 29fd6f1 commit aeb00e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/net/sourceforge/schemaspy/model/TableColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public class TableColumn {
name = rs.getString("COLUMN_NAME");
type = rs.getString("TYPE_NAME");
decimalDigits = rs.getInt("DECIMAL_DIGITS");
length = rs.getInt("COLUMN_SIZE");
Number bufLength = (Number)rs.getObject("BUFFER_LENGTH");
if (bufLength != null && bufLength.shortValue() > 0)
length = bufLength.shortValue();
else
length = rs.getInt("COLUMN_SIZE");

StringBuffer buf = new StringBuffer();
buf.append(length);
Expand Down

0 comments on commit aeb00e5

Please sign in to comment.