summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 91160e02..aab2226b 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -1604,10 +1604,16 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
in
((L'.EAbs ("tab", s, (L'.TFun (s, s), loc),
(L'.EAbs ("e", s, s,
- strcat [sc "DELETE FROM ",
- (L'.ERel 1, loc),
- sc " AS T WHERE ",
- (L'.ERel 0, loc)]), loc)), loc),
+ if #supportsDeleteAs (Settings.currentDbms ()) then
+ strcat [sc "DELETE FROM ",
+ (L'.ERel 1, loc),
+ sc " AS T WHERE ",
+ (L'.ERel 0, loc)]
+ else
+ strcat [sc "DELETE FROM ",
+ (L'.ERel 1, loc),
+ sc " WHERE ",
+ (L'.EFfiApp ("Basis", "unAs", [(L'.ERel 0, loc)]), loc)]), loc)), loc),
fm)
end