summaryrefslogtreecommitdiff
path: root/tests/sql_ops.ur
diff options
context:
space:
mode:
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>
+