summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 09:45:17 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 09:45:17 -0400
commitd44f359d3913fc9cc8a284919180d78f083a6159 (patch)
tree3537c77687f7be703fd21e915ada3505a3fb3183 /tests
parent5d19c132376d05d542b8c18a0b4437455d993da1 (diff)
Switch to using sql_from_items
Diffstat (limited to 'tests')
-rw-r--r--tests/join.ur6
-rw-r--r--tests/join.urp5
-rw-r--r--tests/join.urs1
-rw-r--r--tests/query.ur24
4 files changed, 24 insertions, 12 deletions
diff --git a/tests/join.ur b/tests/join.ur
new file mode 100644
index 00000000..a883e45f
--- /dev/null
+++ b/tests/join.ur
@@ -0,0 +1,6 @@
+table t : { A : int }
+
+fun main () =
+ r <- oneRow (SELECT * FROM t);
+ r <- oneRow (SELECT * FROM t AS T1, t AS T2);
+ return <xml/>
diff --git a/tests/join.urp b/tests/join.urp
new file mode 100644
index 00000000..2719ecc3
--- /dev/null
+++ b/tests/join.urp
@@ -0,0 +1,5 @@
+debug
+database dbname=join
+sql join.sql
+
+join
diff --git a/tests/join.urs b/tests/join.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/join.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page
diff --git a/tests/query.ur b/tests/query.ur
index 334c3d41..5d6264c6 100644
--- a/tests/query.ur
+++ b/tests/query.ur
@@ -6,18 +6,18 @@ datatype list a = Nil | Cons of a * list a
val q1 = (SELECT * FROM t1)
val r1 : transaction (list {A : int, B : string, C : float, D : bool}) =
- query q1
- (fn fs acc => return (Cons (fs.T1, acc)))
- Nil
+ query q1
+ (fn fs acc => return (Cons (fs.T1, acc)))
+ Nil
val r2 : transaction string =
- ls <- r1;
- return (case ls of
- Nil => "Problem"
- | Cons ({B = b, ...}, _) => b)
+ ls <- r1;
+ return (case ls of
+ Nil => "Problem"
+ | Cons ({B = b, ...}, _) => b)
-val main : unit -> transaction page = fn () =>
- s <- r2;
- return <html><body>
- {cdata s}
- </body></html>
+fun main () : transaction page =
+ s <- r2;
+ return <xml><body>
+ {cdata s}
+ </body></xml>