summaryrefslogtreecommitdiff
path: root/src/sqlite.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/sqlite.sml')
-rw-r--r--src/sqlite.sml10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sqlite.sml b/src/sqlite.sml
index a9b6389d..db7052d1 100644
--- a/src/sqlite.sml
+++ b/src/sqlite.sml
@@ -273,6 +273,11 @@ fun init {dbstring, prepared = ss, tables, views, sequences} =
string "\"Can't open SQLite database.\");",
newline,
newline,
+ string "if (sqlite3_exec(sqlite, \"PRAGMA foreign_keys = ON\", NULL, NULL, NULL) != SQLITE_OK)",
+ newline,
+ box [string "uw_error(ctx, FATAL, \"Can't enable foreign_keys for SQLite database\");",
+ newline],
+ newline,
string "if (uw_database_max < SIZE_MAX) {",
newline,
box [string "char buf[100];",
@@ -843,13 +848,14 @@ val () = addDbms {name = "sqlite",
textKeysNeedLengths = false,
supportsNextval = false,
supportsNestedPrepared = false,
- sqlPrefix = "",
+ sqlPrefix = "PRAGMA foreign_keys = ON;\nPRAGMA journal_mode = WAL;\n\n",
supportsOctetLength = false,
trueString = "1",
falseString = "0",
onlyUnion = false,
nestedRelops = false,
windowFunctions = false,
- supportsIsDistinctFrom = false}
+ supportsIsDistinctFrom = false,
+ supportsSHA512 = false}
end