diff tests/policy.ur @ 1200:5eac14322548

Generated basic dummy Iflow conditions
author Adam Chlipala <adamc@hcoop.net>
date Sun, 04 Apr 2010 14:37:19 -0400
parents c316ca3c9ec6
children 8793fd48968c
line wrap: on
line diff
--- a/tests/policy.ur	Sun Apr 04 12:29:34 2010 -0400
+++ b/tests/policy.ur	Sun Apr 04 14:37:19 2010 -0400
@@ -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>