aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-11-17 17:31:47 -0500
committerJames Moger <james.moger@gitblit.com>2015-04-10 09:02:04 -0400
commitac8eed79c231d951287a8bf23a8334109d5fac44 (patch)
tree3024a9a59510a69c2027afec67ccf00441542e0e /src
parentc9c00d3131227997c3cef27c69687fa72a8026fc (diff)
downloadiciql-ac8eed79c231d951287a8bf23a8334109d5fac44.tar.gz
iciql-ac8eed79c231d951287a8bf23a8334109d5fac44.zip
Drop precision and length from SQL->Java type determination
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/iciql/ModelUtils.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/iciql/ModelUtils.java b/src/main/java/com/iciql/ModelUtils.java
index c3fd847..7fa1de6 100644
--- a/src/main/java/com/iciql/ModelUtils.java
+++ b/src/main/java/com/iciql/ModelUtils.java
@@ -189,6 +189,10 @@ class ModelUtils {
sqlType = sqlType.toUpperCase();
// XXX dropping "UNSIGNED" or parts like that could be trouble
sqlType = sqlType.split(" ")[0].trim();
+ if (sqlType.indexOf('(') > -1) {
+ // strip out length or precision
+ sqlType = sqlType.substring(0, sqlType.indexOf('('));
+ }
if (SQL_TYPES.containsKey(sqlType)) {
// convert the sqlType to a standard type