summaryrefslogtreecommitdiff
path: root/tests
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
parentd35c26d04ae2a6a979b21c82603cce0a3ea330c4 (diff)
'ORDER BY RANDOM' (based on a patch from Ron de Bruijn)
Diffstat (limited to 'tests')
-rw-r--r--tests/random.ur8
-rw-r--r--tests/random.urp4
2 files changed, 12 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>
diff --git a/tests/random.urp b/tests/random.urp
new file mode 100644
index 00000000..5cc06fe5
--- /dev/null
+++ b/tests/random.urp
@@ -0,0 +1,4 @@
+database dbname=test
+sql random.sql
+
+random