summaryrefslogtreecommitdiff
path: root/tests/policy.ur
diff options
context:
space:
mode:
Diffstat (limited to 'tests/policy.ur')
-rw-r--r--tests/policy.ur9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/policy.ur b/tests/policy.ur
index b821d1d1..9cc230bf 100644
--- a/tests/policy.ur
+++ b/tests/policy.ur
@@ -8,8 +8,11 @@ table order : { Id : order, Fruit : fruit, Qty : int, Code : int }
PRIMARY KEY Id,
CONSTRAINT Fruit FOREIGN KEY Fruit REFERENCES fruit(Id)
-policy query_policy (SELECT fruit.Id, fruit.Nam, fruit.Weight FROM fruit)
-policy query_policy (SELECT order.Id, order.Fruit, order.Qty FROM order)
+policy query_policy (SELECT fruit.Id, fruit.Nam, fruit.Weight
+ FROM fruit)
+policy query_policy (SELECT order.Id, order.Fruit, order.Qty
+ FROM order, fruit
+ WHERE order.Fruit = fruit.Id)
fun main () =
x1 <- queryX (SELECT fruit.Id, fruit.Nam
@@ -18,7 +21,7 @@ fun main () =
x2 <- queryX (SELECT fruit.Nam, order.Qty
FROM fruit, order
- WHERE order.Fruit = fruit.Id)
+ WHERE fruit.Id = order.Fruit)
(fn x => <xml><li>{[x.Fruit.Nam]}: {[x.Order.Qty]}</li></xml>);
return <xml><body>