Skip to content

Commit

Permalink
Feature #1243120 - Support Oracle nested tables
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Jul 23, 2005
1 parent d884494 commit d53b339
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/net/sourceforge/schemaspy/model/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,15 @@ public int getNumRows() {
return numRows;
}

/**
* fetch the number of rows contained in this table.
*
* returns -1 if unable to successfully fetch the row count
*
* @param db Database
* @throws SQLException
* @return int
*/
protected int fetchNumRows(Database db) throws SQLException {
PreparedStatement stmt = null;
ResultSet rs = null;
Expand All @@ -508,10 +517,11 @@ protected int fetchNumRows(Database db) throws SQLException {
while (rs.next()) {
return rs.getInt(1);
}
return 0;
return -1;
} catch (SQLException sqlException) {
System.err.println("Unable to extract the number of rows for table " + getName() + ", using '-1'");
System.err.println(sql);
throw sqlException;
return -1;
} finally {
if (rs != null)
rs.close();
Expand Down

0 comments on commit d53b339

Please sign in to comment.