comparison src/monoize.sml @ 277:286f734db702

First query execution (not retrieving results yet)
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 15:29:45 -0400
parents e4baf03a3a64
children c0e4ac23522d
comparison
equal deleted inserted replaced
276:ed4af33681d8 277:286f734db702
621 sc (" AS _" ^ x) 621 sc (" AS _" ^ x)
622 ]) sexps 622 ]) sexps
623 @ map (fn (x, xts) => 623 @ map (fn (x, xts) =>
624 strcatComma loc 624 strcatComma loc
625 (map (fn (x', _) => 625 (map (fn (x', _) =>
626 sc (x ^ "." ^ x')) 626 sc (x ^ ".lw_" ^ x'))
627 xts)) stables), 627 xts)) stables),
628 sc " FROM ", 628 sc " FROM ",
629 strcatComma loc (map (fn (x, _) => strcat loc [(L'.EField (gf "From", x), loc), 629 strcatComma loc (map (fn (x, _) => strcat loc [(L'.EField (gf "From", x), loc),
630 sc (" AS " ^ x)]) tables), 630 sc (" AS " ^ x)]) tables),
631 (L'.ECase (gf "Where", 631 (L'.ECase (gf "Where",
648 strcat loc [ 648 strcat loc [
649 sc " GROUP BY ", 649 sc " GROUP BY ",
650 strcatComma loc (map (fn (x, xts) => 650 strcatComma loc (map (fn (x, xts) =>
651 strcatComma loc 651 strcatComma loc
652 (map (fn (x', _) => 652 (map (fn (x', _) =>
653 sc (x ^ "." ^ x')) 653 sc (x ^ ".lw_" ^ x'))
654 xts)) grouped) 654 xts)) grouped)
655 ], 655 ],
656 656
657 (L'.ECase (gf "Having", 657 (L'.ECase (gf "Having",
658 [((L'.PPrim (Prim.String "TRUE"), loc), 658 [((L'.PPrim (Prim.String "TRUE"), loc),
869 _), _), 869 _), _),
870 _), _), 870 _), _),
871 _), _), 871 _), _),
872 _), _), 872 _), _),
873 (L.CName tab, _)), _), 873 (L.CName tab, _)), _),
874 (L.CName field, _)) => ((L'.EPrim (Prim.String (tab ^ "." ^ field)), loc), fm) 874 (L.CName field, _)) => ((L'.EPrim (Prim.String (tab ^ ".lw_" ^ field)), loc), fm)
875 875
876 | L.ECApp ( 876 | L.ECApp (
877 (L.ECApp ( 877 (L.ECApp (
878 (L.ECApp ( 878 (L.ECApp (
879 (L.ECApp ( 879 (L.ECApp (