summaryrefslogtreecommitdiff
path: root/tests/random.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-02-02 11:40:10 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-02-02 11:40:10 -0500
commit4538805297f36f5000c23d5f5f8d851071480d8f (patch)
tree5271983ec2581bb6cf7fecc8053b8c3e41de9250 /tests/random.ur
parentd35c26d04ae2a6a979b21c82603cce0a3ea330c4 (diff)
'ORDER BY RANDOM' (based on a patch from Ron de Bruijn)
Diffstat (limited to 'tests/random.ur')
-rw-r--r--tests/random.ur8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/random.ur b/tests/random.ur
new file mode 100644
index 00000000..b2006302
--- /dev/null
+++ b/tests/random.ur
@@ -0,0 +1,8 @@
+table t : { A : int }
+
+fun main () : transaction page =
+ x <- queryX (SELECT *
+ FROM t
+ ORDER BY RANDOM)
+ (fn r => <xml>{[r.T.A]}<br/></xml>);
+ return <xml><body>{x}</body></xml>