aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/iciql/SQLDialectH2.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2011-08-11 14:04:01 -0400
committerJames Moger <james.moger@gmail.com>2011-08-11 14:04:01 -0400
commit0333ed4cf0b5db3f9ffcb0da31787f6e44139af5 (patch)
treea0c0c57e38dd5e8e48e03b2aa4ad8a2c39bff189 /src/com/iciql/SQLDialectH2.java
parentf3faeb5d1ea631b0074441f97080e1f2a9145f4b (diff)
downloadiciql-0333ed4cf0b5db3f9ffcb0da31787f6e44139af5.tar.gz
iciql-0333ed4cf0b5db3f9ffcb0da31787f6e44139af5.zip
Added support for HSQL database. Revised dialects some more.
Moved CREATE TABLE and CREATE INDEX statement generation to the dialect. Added DECIMAL(length, scale) support. Improved automatic dialect detection. Unspecified length string is now CLOB instead of TEXT. Boolean now maps to BOOLEAN instead of BIT. Expressions on unmapped fields will throw an IciqlException. Improved exception reporting.
Diffstat (limited to 'src/com/iciql/SQLDialectH2.java')
-rw-r--r--src/com/iciql/SQLDialectH2.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/iciql/SQLDialectH2.java b/src/com/iciql/SQLDialectH2.java
index c65c277..80786f9 100644
--- a/src/com/iciql/SQLDialectH2.java
+++ b/src/com/iciql/SQLDialectH2.java
@@ -31,12 +31,7 @@ public class SQLDialectH2 extends SQLDialectDefault {
}
@Override
- public boolean supportsMerge() {
- return true;
- }
-
- @Override
- public String prepareCreateIndex(String schema, String table, IndexDefinition index) {
+ public void prepareCreateIndex(SQLStatement stat, String schema, String table, IndexDefinition index) {
StatementBuilder buff = new StatementBuilder();
buff.append("CREATE ");
switch (index.type) {
@@ -62,7 +57,7 @@ public class SQLDialectH2 extends SQLDialectDefault {
buff.append(col);
}
buff.append(")");
- return buff.toString();
+ stat.setSQL(buff.toString());
}
@Override