diff options
Diffstat (limited to 'src/com/iciql/ModelUtils.java')
-rw-r--r-- | src/com/iciql/ModelUtils.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/com/iciql/ModelUtils.java b/src/com/iciql/ModelUtils.java index 048ce8d..5613d00 100644 --- a/src/com/iciql/ModelUtils.java +++ b/src/com/iciql/ModelUtils.java @@ -253,7 +253,10 @@ class ModelUtils { String value = null; if (Number.class.isAssignableFrom(objectClass)) { // NUMBER - value = ((Number) o).toString(); + return ((Number) o).toString(); + } else if (Boolean.class.isAssignableFrom(objectClass)) { + // BOOLEAN + return o.toString(); } else if (java.sql.Date.class.isAssignableFrom(objectClass)) { // DATE value = new SimpleDateFormat("yyyy-MM-dd").format((Date) o); @@ -266,9 +269,6 @@ class ModelUtils { } else if (String.class.isAssignableFrom(objectClass)) { // STRING value = o.toString(); - } else if (Boolean.class.isAssignableFrom(objectClass)) { - // BOOLEAN - value = o.toString(); } if (value == null) { return "''"; @@ -313,10 +313,6 @@ class ModelUtils { return true; } - // TODO H2 single-quotes literal values, which is useful. - // MySQL does not single-quote literal values so its hard to - // differentiate a FUNCTION/VARIABLE from a literal value. - // function / variable Pattern functionDefault = Pattern.compile("[^'].*[^']"); if (functionDefault.matcher(defaultValue).matches()) { |