diff options
author | Adam Chlipala <adam@chlipala.net> | 2018-12-17 17:05:22 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2018-12-17 17:05:22 -0500 |
commit | c88aa571002f0dd713158f8b80bfeacbd0a69569 (patch) | |
tree | 507937107d84d7bff716d0a7a329734101cba009 /src/settings.sml | |
parent | 7578916b630bd84ec3f8e7d97aaaa1cc7828e5ef (diff) |
When using a file cache, add plugin-loading code (for SHA512) to tops of .sql files
Diffstat (limited to 'src/settings.sml')
-rw-r--r-- | src/settings.sml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/settings.sml b/src/settings.sml index 3772fc04..6499da67 100644 --- a/src/settings.sml +++ b/src/settings.sml @@ -647,7 +647,7 @@ type dbms = { nestedRelops : bool, windowFunctions: bool, supportsIsDistinctFrom : bool, - supportsSHA512 : bool + supportsSHA512 : string option } val dbmses = ref ([] : dbms list) @@ -681,7 +681,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 = @@ -728,7 +728,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 (); |