summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-07-12 15:05:40 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-07-12 15:05:40 -0400
commit23b1f6b511c89c4916b65b466622a6dcdf1bb332 (patch)
treec1a396c05b3c698202cfc482584b8d221ff51b47 /src/monoize.sml
parent01553b111f03ff1d916dbc6d34a54a0217cc75a0 (diff)
MySQL demo/sql succeeds in reading no rows
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