comparison src/lacweb.grm @ 235:0608a0cfd32a

COUNT
author Adam Chlipala <adamc@hcoop.net>
date Thu, 28 Aug 2008 11:59:46 -0400
parents 82409ef72019
children f5732dc1316c
comparison
equal deleted inserted replaced
234:82409ef72019 235:0608a0cfd32a
167 167
168 | SELECT | FROM | AS | CWHERE | GROUP | ORDER | BY | HAVING 168 | SELECT | FROM | AS | CWHERE | GROUP | ORDER | BY | HAVING
169 | UNION | INTERSECT | EXCEPT 169 | UNION | INTERSECT | EXCEPT
170 | LIMIT | OFFSET | ALL 170 | LIMIT | OFFSET | ALL
171 | TRUE | FALSE | CAND | OR | NOT 171 | TRUE | FALSE | CAND | OR | NOT
172 | COUNT
172 | NE | LT | LE | GT | GE 173 | NE | LT | LE | GT | GE
173 174
174 %nonterm 175 %nonterm
175 file of decl list 176 file of decl list
176 | decls of decl list 177 | decls of decl list
822 | LBRACE eexp RBRACE (sql_inject (#1 eexp, 823 | LBRACE eexp RBRACE (sql_inject (#1 eexp,
823 EWild, 824 EWild,
824 s (LBRACEleft, RBRACEright))) 825 s (LBRACEleft, RBRACEright)))
825 | LPAREN sqlexp RPAREN (sqlexp) 826 | LPAREN sqlexp RPAREN (sqlexp)
826 827
828 | COUNT LPAREN STAR RPAREN (let
829 val loc = s (COUNTleft, RPARENright)
830 in
831 (EApp ((EVar (["Basis"], "sql_count"), loc),
832 (ERecord [], loc)), loc)
833 end)
834
827 wopt : (sql_inject (EVar (["Basis"], "True"), 835 wopt : (sql_inject (EVar (["Basis"], "True"),
828 EVar (["Basis"], "sql_bool"), 836 EVar (["Basis"], "sql_bool"),
829 dummy)) 837 dummy))
830 | CWHERE sqlexp (sqlexp) 838 | CWHERE sqlexp (sqlexp)
831 839