summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 15:04:37 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 15:04:37 -0400
commit51f2a80dac5c3cd25a27fb5abfdfa50d813ab0b2 (patch)
treee4e2246dc15a7cbbf067401a21197b6fd17ea95b /tests
parentcaf010bca085bea65037d194c3eb21ca8b83c23b (diff)
A view query works
Diffstat (limited to 'tests')
-rw-r--r--tests/view.ur10
-rw-r--r--tests/view.urp5
-rw-r--r--tests/view.urs1
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/view.ur b/tests/view.ur
new file mode 100644
index 00000000..36d77deb
--- /dev/null
+++ b/tests/view.ur
@@ -0,0 +1,10 @@
+table t : { A : int, B : string }
+
+view v = SELECT t.A AS X FROM t
+
+fun main () =
+ rows <- queryX (SELECT * FROM v)
+ (fn r => <xml><li>{[r.V.X]}</li></xml>);
+ return <xml><body>
+ {rows}
+ </body></xml>
diff --git a/tests/view.urp b/tests/view.urp
new file mode 100644
index 00000000..3528ec9d
--- /dev/null
+++ b/tests/view.urp
@@ -0,0 +1,5 @@
+debug
+database dbname=view
+sql view.sql
+
+view
diff --git a/tests/view.urs b/tests/view.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/view.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page