summaryrefslogtreecommitdiff
path: root/tests/sql_ops.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-12-09 14:41:19 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-12-09 14:41:19 -0500
commit5108a7e86734b335b65b9efd60a7f2f2797b602b (patch)
tree1bdcd341e3e43df6833972a5384b8552f8343039 /tests/sql_ops.ur
parent55fefa6122803e9739e9e71f1d50eae671665df4 (diff)
Add SQL arithmetic operators
Diffstat (limited to 'tests/sql_ops.ur')
-rw-r--r--tests/sql_ops.ur8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sql_ops.ur b/tests/sql_ops.ur
new file mode 100644
index 00000000..34e78775
--- /dev/null
+++ b/tests/sql_ops.ur
@@ -0,0 +1,8 @@
+table t : { A : int, B : float }
+
+val q = (SELECT t.A + t.A AS X, t.B * t.B AS Y FROM t)
+
+fun main () : transaction page =
+ xml <- queryX q (fn r => <xml>{[r.X]}, {[r.Y]}<br/></xml>);
+ return <xml><body>{xml}</body></xml>
+