annotate 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
rev   line source
adam@1776 1 table empsalary : { Depname : string,
adam@1776 2 Empno : int,
adam@1776 3 Salary : int }
adam@1776 4
adam@1776 5 fun main () : transaction page =
adam@1776 6 x <- queryX (SELECT empsalary.Depname, empsalary.Empno, empsalary.Salary, RANK() AS R
adam@1776 7 FROM empsalary)
adam@1776 8 (fn r => <xml>{[r.Empsalary.Depname]}, {[r.Empsalary.Empno]}, {[r.Empsalary.Salary]}, {[r.R]}<br/></xml>);
adam@1776 9 return <xml><body>
adam@1776 10 {x}
adam@1776 11 </body></xml>