summaryrefslogtreecommitdiff
path: root/src/lacweb.grm
diff options
context:
space:
mode:
Diffstat (limited to 'src/lacweb.grm')
-rw-r--r--src/lacweb.grm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lacweb.grm b/src/lacweb.grm
index c6d89bf6..e230d91e 100644
--- a/src/lacweb.grm
+++ b/src/lacweb.grm
@@ -169,6 +169,7 @@ fun sql_relop (oper, sqlexp1, sqlexp2, loc) =
| UNION | INTERSECT | EXCEPT
| LIMIT | OFFSET | ALL
| TRUE | FALSE | CAND | OR | NOT
+ | COUNT
| NE | LT | LE | GT | GE
%nonterm
@@ -824,6 +825,13 @@ sqlexp : TRUE (sql_inject (EVar (["Basis"], "True"),
s (LBRACEleft, RBRACEright)))
| LPAREN sqlexp RPAREN (sqlexp)
+ | COUNT LPAREN STAR RPAREN (let
+ val loc = s (COUNTleft, RPARENright)
+ in
+ (EApp ((EVar (["Basis"], "sql_count"), loc),
+ (ERecord [], loc)), loc)
+ end)
+
wopt : (sql_inject (EVar (["Basis"], "True"),
EVar (["Basis"], "sql_bool"),
dummy))