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/cjr_print.sml | |
parent | 7578916b630bd84ec3f8e7d97aaaa1cc7828e5ef (diff) |
When using a file cache, add plugin-loading code (for SHA512) to tops of .sql files
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 87d2576c..e0153944 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -3783,7 +3783,13 @@ fun p_sql env (ds, _) = end) env ds in - box (string (#sqlPrefix (Settings.currentDbms ())) :: pps) + box ((case Settings.getFileCache () of + NONE => [] + | SOME _ => case #supportsSHA512 (Settings.currentDbms ()) of + NONE => (ErrorMsg.error "Using file cache with database that doesn't support SHA512"; + []) + | SOME line => [string line, newline, newline]) + @ string (#sqlPrefix (Settings.currentDbms ())) :: pps) end end |