Mercurial > urweb
diff tests/window.ur @ 1776:8f28c3295148
Compiled a window function use
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 02 Jun 2012 16:00:50 -0400 |
parents | |
children | 59b07fdae1ff |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/window.ur Sat Jun 02 16:00:50 2012 -0400 @@ -0,0 +1,11 @@ +table empsalary : { Depname : string, + Empno : int, + Salary : int } + +fun main () : transaction page = + x <- queryX (SELECT empsalary.Depname, empsalary.Empno, empsalary.Salary, RANK() AS R + FROM empsalary) + (fn r => <xml>{[r.Empsalary.Depname]}, {[r.Empsalary.Empno]}, {[r.Empsalary.Salary]}, {[r.R]}<br/></xml>); + return <xml><body> + {x} + </body></xml>