From 5c70dc9c2562f40211d51b35854c50a626c9c163 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 11 Aug 2011 14:38:02 -0400 Subject: Documentation. Added another unmapped field case. --- src/com/iciql/IciqlException.java | 2 +- src/com/iciql/SQLDialectDefault.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/com') diff --git a/src/com/iciql/IciqlException.java b/src/com/iciql/IciqlException.java index 6e55c79..5a99c5e 100644 --- a/src/com/iciql/IciqlException.java +++ b/src/com/iciql/IciqlException.java @@ -30,7 +30,7 @@ public class IciqlException extends RuntimeException { public static final int CODE_TABLE_NOT_FOUND = 3; public static final int CODE_INDEX_ALREADY_EXISTS = 4; - private static final String TOKEN_UNMAPPED_FIELD = "\\? (=|\\>|\\<|!=|\\>=|\\<=|LIKE|BETWEEN) \\?"; + private static final String TOKEN_UNMAPPED_FIELD = "\\? (=|\\>|\\<|\\<\\>|!=|\\>=|\\<=|LIKE|BETWEEN) \\?"; private static final long serialVersionUID = 1L; diff --git a/src/com/iciql/SQLDialectDefault.java b/src/com/iciql/SQLDialectDefault.java index 3fd2067..7786829 100644 --- a/src/com/iciql/SQLDialectDefault.java +++ b/src/com/iciql/SQLDialectDefault.java @@ -100,7 +100,7 @@ public class SQLDialectDefault implements SQLDialect { buff.appendExceptFirst(", "); buff.append(prepareColumnName(field.columnName)).append(' '); String dataType = field.dataType; - if (dataType.equals("VARCHAR")) { + if (dataType.equals("VARCHAR")) { // check to see if we should use VARCHAR or CLOB if (field.length <= 0) { dataType = "CLOB"; @@ -111,7 +111,7 @@ public class SQLDialectDefault implements SQLDialect { } } else if (dataType.equals("DECIMAL")) { // DECIMAL(precision,scale) - buff.append(convertSqlType(dataType)); + buff.append(convertSqlType(dataType)); if (field.length > 0) { buff.append('(').append(field.length); if (field.scale > 0) { @@ -173,13 +173,13 @@ public class SQLDialectDefault implements SQLDialect { @Override public void prepareCreateIndex(SQLStatement stat, String schemaName, String tableName, IndexDefinition index) { - throw new IciqlException("Dialect does not support index creation!"); + throw new IciqlException("{0} does not support index creation!", getClass().getSimpleName()); } @Override public void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition def, Object obj) { - throw new IciqlException("Dialect does not support merge statements!"); + throw new IciqlException("{0} does not support merge statements!", getClass().getSimpleName()); } @Override -- cgit v1.2.3