summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-06-02 16:00:50 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-06-02 16:00:50 -0400
commit8b6941ac380392e36a30a06fb558c47a8fe7d2d8 (patch)
treeda888caf3fa14afe2943de2d9c8c82830c209de1 /tests
parentf4dab2b31d11cc6957c1a64a3ffe6261816d96d4 (diff)
Compiled a window function use
Diffstat (limited to 'tests')
-rw-r--r--tests/window.ur11
-rw-r--r--tests/window.urp6
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