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
commit81138f15749d9fcd2b6056d4c4cd8c0edc5fce4b (patch)
treee4e2246dc15a7cbbf067401a21197b6fd17ea95b /tests
parent488033c82277ffe87f8fbd32ccd52298e0883743 (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