summaryrefslogtreecommitdiff
path: root/src/settings.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.sml')
-rw-r--r--src/settings.sml11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/settings.sml b/src/settings.sml
index 2e386a4f..f42df135 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -648,7 +648,7 @@ type dbms = {
nestedRelops : bool,
windowFunctions: bool,
supportsIsDistinctFrom : bool,
- supportsSHA512 : bool
+ supportsSHA512 : string option
}
val dbmses = ref ([] : dbms list)
@@ -682,7 +682,7 @@ val curDb = ref ({name = "",
nestedRelops = false,
windowFunctions = false,
supportsIsDistinctFrom = false,
- supportsSHA512 = false} : dbms)
+ supportsSHA512 = NONE} : dbms)
fun addDbms v = dbmses := v :: !dbmses
fun setDbms s =
@@ -729,7 +729,8 @@ fun getSigFile () = !sigFile
val fileCache = ref (NONE : string option)
fun setFileCache v =
- (if Option.isSome v andalso not (#supportsSHA512 (currentDbms ())) then
+ (if Option.isSome v andalso (case #supportsSHA512 (currentDbms ()) of NONE => true
+ | SOME _ => false) then
ErrorMsg.error "The selected database engine is incompatible with file caching."
else
();
@@ -741,9 +742,11 @@ structure SS = BinarySetFn(struct
val compare = String.compare
end)
+val safeGetDefault = ref false
val safeGet = ref SS.empty
+fun setSafeGetDefault b = safeGetDefault := b
fun setSafeGets ls = safeGet := SS.addList (SS.empty, ls)
-fun isSafeGet x = SS.member (!safeGet, x)
+fun isSafeGet x = !safeGetDefault orelse SS.member (!safeGet, x)
val onError = ref (NONE : (string * string list * string) option)
fun setOnError x = onError := x