diff options
author | James Moger <james.moger@gitblit.com> | 2015-04-30 12:03:05 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2015-04-30 12:03:05 -0400 |
commit | 23eaf92995f7e2b087db19e03feffb733c0fd8f8 (patch) | |
tree | afc7e967ab5fec2d976c43dd18416c5de8c03a7b /src/main/java | |
parent | 1d58cf39fde81a231bbc2f78a2786367b4e95ae8 (diff) | |
download | iciql-23eaf92995f7e2b087db19e03feffb733c0fd8f8.tar.gz iciql-23eaf92995f7e2b087db19e03feffb733c0fd8f8.zip |
Improve SQLite dialect and unit-test conformance
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/iciql/SQLDialectSQLite.java | 17 |
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) {
|