diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 15:16:10 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 15:16:10 -0400 |
commit | 6471ebba2ec8aa38b4735263162181a3b7084b47 (patch) | |
tree | 8cca32b7f7e9cd9bf68714b8140383c11edf5668 | |
parent | b7606fcacfb9435651b6be6cbbb2e3a89414ef3a (diff) |
First DELETE works
-rw-r--r-- | src/monoize.sml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 87aaaff5..c310feb9 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -654,6 +654,20 @@ fun monoExp (env, st, fm) (all as (e, loc)) = end | _ => poly ()) + | L.ECApp ((L.EFfi ("Basis", "delete"), _), _) => + let + val s = (L'.TFfi ("Basis", "string"), loc) + fun sc s = (L'.EPrim (Prim.String s), loc) + in + ((L'.EAbs ("tab", s, (L'.TFun (s, s), loc), + (L'.EAbs ("e", s, s, + strcat loc [sc "DELETE FROM ", + (L'.ERel 1, loc), + sc " AS T WHERE ", + (L'.ERel 0, loc)]), loc)), loc), + fm) + end + | L.ECApp ( (L.ECApp ( (L.ECApp ((L.EFfi ("Basis", "query"), _), (L.CRecord (_, tables), _)), _), |