aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/iciql/SQLDialectSQLite.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2015-04-30 12:03:05 -0400
committerJames Moger <james.moger@gitblit.com>2015-04-30 12:03:05 -0400
commit23eaf92995f7e2b087db19e03feffb733c0fd8f8 (patch)
treeafc7e967ab5fec2d976c43dd18416c5de8c03a7b /src/main/java/com/iciql/SQLDialectSQLite.java
parent1d58cf39fde81a231bbc2f78a2786367b4e95ae8 (diff)
downloadiciql-23eaf92995f7e2b087db19e03feffb733c0fd8f8.tar.gz
iciql-23eaf92995f7e2b087db19e03feffb733c0fd8f8.zip
Improve SQLite dialect and unit-test conformance
Diffstat (limited to 'src/main/java/com/iciql/SQLDialectSQLite.java')
-rw-r--r--src/main/java/com/iciql/SQLDialectSQLite.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/main/java/com/iciql/SQLDialectSQLite.java b/src/main/java/com/iciql/SQLDialectSQLite.java
index 28ae852..acb9b31 100644
--- a/src/main/java/com/iciql/SQLDialectSQLite.java
+++ b/src/main/java/com/iciql/SQLDialectSQLite.java
@@ -35,14 +35,13 @@ public class SQLDialectSQLite extends SQLDialectDefault {
@Override
public boolean supportsSavePoints() {
- return false;
- }
-
- @Override
- public void configureDialect(Db db) {
- super.configureDialect(db);
- // enable foreign key constraint enforcement
- db.executeUpdate("PRAGMA foreign_keys = ON;");
+ // SAVEPOINT support was added after the 3.8.7 release
+ String [] chunks = productVersion.split("\\.");
+ if (Integer.parseInt(chunks[0]) > 3) {
+ return true;
+ }
+ float f = Float.parseFloat(chunks[1] + "." + chunks[2]);
+ return (f > 8.7);
}
@Override
@@ -104,8 +103,6 @@ public class SQLDialectSQLite extends SQLDialectDefault {
buff.append("INDEX IF NOT EXISTS ");
buff.append(index.indexName);
buff.append(" ON ");
- // FIXME maybe we can use schemaName ?
- // buff.append(prepareTableName(schemaName, tableName));
buff.append(tableName);
buff.append("(");
for (String col : index.columnNames) {