summaryrefslogtreecommitdiff
path: root/tests/policy.ur
diff options
context:
space:
mode:
Diffstat (limited to 'tests/policy.ur')
-rw-r--r--tests/policy.ur14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/policy.ur b/tests/policy.ur
index db87b582..1087bab9 100644
--- a/tests/policy.ur
+++ b/tests/policy.ur
@@ -1,3 +1,13 @@
-table fruit : { Id : int, Nam : string, Weight : float }
+table fruit : { Id : int, Nam : string, Weight : float, Secret : string }
-policy query_policy (SELECT * FROM fruit)
+policy query_policy (SELECT fruit.Id, fruit.Nam, fruit.Weight FROM fruit)
+
+fun main () =
+ xml <- queryX (SELECT fruit.Nam
+ FROM fruit
+ ORDER BY fruit.Nam)
+ (fn x => <xml><li>{[x.Fruit.Nam]}</li></xml>);
+
+ return <xml><body>
+ {xml}
+ </body></xml>