comparison src/lacweb.grm @ 223:bbe5899a9585

Queries back to working as well as before, after start of refactoring to support grouping
author Adam Chlipala <adamc@hcoop.net>
date Thu, 21 Aug 2008 12:49:29 -0400
parents 36fef91a6bbf
children cb8a68964ebb
comparison
equal deleted inserted replaced
222:36fef91a6bbf 223:bbe5899a9585
638 loc)], loc))) tabs 638 loc)], loc))) tabs
639 end 639 end
640 640
641 val sel = (CRecord sel, loc) 641 val sel = (CRecord sel, loc)
642 642
643 val hopt = (sql_inject (EVar (["Basis"], "True"),
644 EVar (["Basis"], "sql_bool"),
645 loc))
646
643 val e = (EVar (["Basis"], "sql_query"), loc) 647 val e = (EVar (["Basis"], "sql_query"), loc)
644 val e = (ECApp (e, sel), loc) 648 val _ = [((CName "GroupBy", loc),
649 (ECApp ((EVar (["Basis"], "sql_subset_all"), loc),
650 (CWild (KRecord (KType, loc), loc), loc)), loc)),
651 ((CName "Having", loc),
652 hopt)]
645 val re = (ERecord [((CName "From", loc), 653 val re = (ERecord [((CName "From", loc),
646 (ERecord tables, loc)), 654 (ERecord tables, loc)),
647 ((CName "Where", loc), 655 ((CName "Where", loc),
648 wopt)], loc) 656 wopt),
657 ((CName "SelectFields", loc),
658 (ECApp ((EVar (["Basis"], "sql_subset"), loc),
659 sel), loc))], loc)
660
649 val e = (EApp (e, re), loc) 661 val e = (EApp (e, re), loc)
650 in 662 in
651 e 663 e
652 end) 664 end)
653 665