aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/iciql/SQLDialectH2.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/iciql/SQLDialectH2.java')
-rw-r--r--src/com/iciql/SQLDialectH2.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/iciql/SQLDialectH2.java b/src/com/iciql/SQLDialectH2.java
index 1da45f6..6b3bab1 100644
--- a/src/com/iciql/SQLDialectH2.java
+++ b/src/com/iciql/SQLDialectH2.java
@@ -37,6 +37,19 @@ public class SQLDialectH2 extends SQLDialectDefault {
return "CREATE CACHED TABLE IF NOT EXISTS";
}
}
+
+ @Override
+ protected <T> String prepareCreateView(TableDefinition<T> def) {
+ return "CREATE VIEW IF NOT EXISTS";
+ }
+
+ @Override
+ public <T> void prepareDropView(SQLStatement stat, TableDefinition<T> def) {
+ StatementBuilder buff = new StatementBuilder("DROP VIEW IF EXISTS "
+ + prepareTableName(def.schemaName, def.tableName));
+ stat.setSQL(buff.toString());
+ return;
+ }
@Override
protected boolean prepareColumnDefinition(StatementBuilder buff, String dataType,