]> source.dussan.org Git - iciql.git/commitdiff
Fix for Oracle column default value (#35)
authorHumberto Dias <hldtux@gmail.com>
Sun, 2 May 2021 16:31:24 +0000 (13:31 -0300)
committerGitHub <noreply@github.com>
Sun, 2 May 2021 16:31:24 +0000 (12:31 -0400)
* 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>
src/main/java/com/iciql/TableInspector.java

index 02bb8aefcc22e416a10f6cb103744affdb92742a..207b3c6dcdb76fff5b3dd6318257549455deaca1 100644 (file)
@@ -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);
             }