Mercurial > urweb
diff tests/agg.ur @ 265:b66e692422a4
Monoize COUNT(*)
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 16:20:34 -0400 |
parents | 71bafe66dbe1 |
children | 7a7efbb3e354 |
line wrap: on
line diff
--- a/tests/agg.ur Sun Aug 31 16:13:07 2008 -0400 +++ b/tests/agg.ur Sun Aug 31 16:20:34 2008 -0400 @@ -8,3 +8,15 @@ (*val q5 = (SELECT t1.A FROM t1 GROUP BY t1.B)*) val q5 = (SELECT SUM(t1.A) AS X FROM t1 GROUP BY t1.B) + + +datatype list a = Nil | Cons of a * list a + +val r1 : transaction (list int) = + query q1 + (fn fs acc => return (Cons (fs.X, acc))) + Nil + +val main : unit -> transaction page = fn () => + n <- r1; + return <html><body>Nothing to see here!</body></html>