summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-10-15 09:04:41 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-10-15 09:04:41 -0400
commite2a639a782d2c7be434b819156fb924c7d955f12 (patch)
tree49c7507ba8ae3e2d432d2b6b22e33bf22564142d /tests
parent8a167261f4de68926907c3cc97f8252957274bff (diff)
For new IF, fix Monoize typing and add to manual
Diffstat (limited to 'tests')
-rw-r--r--tests/sql_if.ur6
-rw-r--r--tests/sql_if.urp4
-rw-r--r--tests/sql_if.urs1
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/sql_if.ur b/tests/sql_if.ur
new file mode 100644
index 00000000..4413e762
--- /dev/null
+++ b/tests/sql_if.ur
@@ -0,0 +1,6 @@
+table t : { A : int, B : int }
+
+fun main () =
+ x <- queryX (SELECT * FROM t WHERE IF t.A = 6 THEN t.B < 2 ELSE t.B > 5)
+ (fn r => <xml><li>{[r.T.A]}, {[r.T.B]}</li></xml>);
+ return <xml><body>{x}</body></xml>
diff --git a/tests/sql_if.urp b/tests/sql_if.urp
new file mode 100644
index 00000000..49e846f3
--- /dev/null
+++ b/tests/sql_if.urp
@@ -0,0 +1,4 @@
+database dbname=sql_if
+sql sql_if.sql
+
+sql_if
diff --git a/tests/sql_if.urs b/tests/sql_if.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/sql_if.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page