aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHumberto Dias <hldtux@gmail.com>2021-05-02 13:31:24 -0300
committerGitHub <noreply@github.com>2021-05-02 12:31:24 -0400
commit897b5133828a15a5e506ae475e1793805aa05cfc (patch)
treec7d7600043b170e02fd57a1fa23fdde96defdc0d /src
parent3ae6f66919787d279a78818605126bcdec8f9139 (diff)
downloadiciql-897b5133828a15a5e506ae475e1793805aa05cfc.tar.gz
iciql-897b5133828a15a5e506ae475e1793805aa05cfc.zip
Fix for Oracle column default value (#35)
* Fix for MySql driver class name * Fix for Oracle Column with Default Value * Revert "Fix for MySql driver class name" This reverts commit 66077fcb5a03fb01ae6b11ed6eaba56f2b246b44. Co-authored-by: Humberto Dias <humberto.dias@techne.com.br>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/iciql/TableInspector.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/iciql/TableInspector.java b/src/main/java/com/iciql/TableInspector.java
index 02bb8ae..207b3c6 100644
--- a/src/main/java/com/iciql/TableInspector.java
+++ b/src/main/java/com/iciql/TableInspector.java
@@ -163,7 +163,9 @@ public class TableInspector {
}
}
if (!col.isAutoIncrement) {
- col.defaultValue = rs.getString("COLUMN_DEF");
+ if(rs.getType() != ResultSet.TYPE_FORWARD_ONLY) {
+ col.defaultValue = rs.getString("COLUMN_DEF");
+ }
}
columns.put(col.name.toLowerCase(), col);
}