diff src/monoize.sml @ 309:ea62b15da922

First DELETE works
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 15:16:10 -0400
parents 72480e249130
children 9ad92047a499
line wrap: on
line diff
--- a/src/monoize.sml	Sun Sep 07 15:12:47 2008 -0400
+++ b/src/monoize.sml	Sun Sep 07 15:16:10 2008 -0400
@@ -654,6 +654,20 @@
                  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), _)), _),