diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-06-02 16:00:50 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-06-02 16:00:50 -0400 |
commit | 8b6941ac380392e36a30a06fb558c47a8fe7d2d8 (patch) | |
tree | da888caf3fa14afe2943de2d9c8c82830c209de1 /tests | |
parent | f4dab2b31d11cc6957c1a64a3ffe6261816d96d4 (diff) |
Compiled a window function use
Diffstat (limited to 'tests')
-rw-r--r-- | tests/window.ur | 11 | ||||
-rw-r--r-- | tests/window.urp | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/window.ur b/tests/window.ur new file mode 100644 index 00000000..fd93679c --- /dev/null +++ b/tests/window.ur @@ -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> diff --git a/tests/window.urp b/tests/window.urp new file mode 100644 index 00000000..d1fb21a9 --- /dev/null +++ b/tests/window.urp @@ -0,0 +1,6 @@ +debug +database dbname=test +sql window.sql +rewrite url Window/* + +window |