comparison src/urweb.grm @ 1187:ad9829c3c12c

COUNT(col)
author Adam Chlipala <adamc@hcoop.net>
date Tue, 16 Mar 2010 15:54:35 -0400
parents ce56795b2e5f
children b8cfb05c091d
comparison
equal deleted inserted replaced
1186:a4ac900d3085 1187:ad9829c3c12c
1736 | COUNT LPAREN STAR RPAREN (let 1736 | COUNT LPAREN STAR RPAREN (let
1737 val loc = s (COUNTleft, RPARENright) 1737 val loc = s (COUNTleft, RPARENright)
1738 in 1738 in
1739 (EVar (["Basis"], "sql_count", Infer), loc) 1739 (EVar (["Basis"], "sql_count", Infer), loc)
1740 end) 1740 end)
1741 | COUNT LPAREN sqlexp RPAREN (let
1742 val loc = s (COUNTleft, RPARENright)
1743
1744 val e = (EVar (["Basis"], "sql_count_col", Infer), loc)
1745 val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc),
1746 e), loc)
1747 in
1748 (EApp (e, sqlexp), loc)
1749 end)
1741 | sqlagg LPAREN sqlexp RPAREN (let 1750 | sqlagg LPAREN sqlexp RPAREN (let
1742 val loc = s (sqlaggleft, RPARENright) 1751 val loc = s (sqlaggleft, RPARENright)
1743 1752
1744 val e = (EVar (["Basis"], "sql_" ^ sqlagg, Infer), loc) 1753 val e = (EVar (["Basis"], "sql_" ^ sqlagg, Infer), loc)
1745 val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc), 1754 val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc),