diff options
author | Adam Chlipala <adamc@hcoop.net> | 2010-03-16 15:54:35 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2010-03-16 15:54:35 -0400 |
commit | a33b1fdbf6ff02d806ac5c563f9274abc57b6a43 (patch) | |
tree | 9d33fe703a729a1a6e1317fea053f4a3a646cf52 /src/urweb.grm | |
parent | 2bdffddbb847cbd620b8be911a1c1cb229187fc2 (diff) |
COUNT(col)
Diffstat (limited to 'src/urweb.grm')
-rw-r--r-- | src/urweb.grm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm index 647c311e..a6af8aa3 100644 --- a/src/urweb.grm +++ b/src/urweb.grm @@ -1738,6 +1738,15 @@ sqlexp : TRUE (sql_inject (EVar (["Basis"], "True", In in (EVar (["Basis"], "sql_count", Infer), loc) end) + | COUNT LPAREN sqlexp RPAREN (let + val loc = s (COUNTleft, RPARENright) + + val e = (EVar (["Basis"], "sql_count_col", Infer), loc) + val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc), + e), loc) + in + (EApp (e, sqlexp), loc) + end) | sqlagg LPAREN sqlexp RPAREN (let val loc = s (sqlaggleft, RPARENright) |