Mercurial > urweb
comparison tests/policy.ur @ 1201:8793fd48968c
Generating a good Iflow condition for a test query
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 04 Apr 2010 15:17:57 -0400 |
parents | 5eac14322548 |
children | 509a6d7b60fb |
comparison
equal
deleted
inserted
replaced
1200:5eac14322548 | 1201:8793fd48968c |
---|---|
1 table fruit : { Id : int, Nam : string, Weight : float, Secret : string } | 1 table fruit : { Id : int, Nam : string, Weight : float, Secret : string } |
2 | 2 |
3 policy query_policy (SELECT fruit.Id, fruit.Nam, fruit.Weight FROM fruit) | 3 policy query_policy (SELECT fruit.Id, fruit.Nam, fruit.Weight FROM fruit) |
4 | 4 |
5 fun main () = | 5 fun main () = |
6 xml <- queryX (SELECT fruit.Nam | 6 xml <- queryX (SELECT fruit.Id, fruit.Nam |
7 FROM fruit | 7 FROM fruit) |
8 ORDER BY fruit.Nam) | |
9 (fn x => <xml><li>{[x.Fruit.Nam]}</li></xml>); | 8 (fn x => <xml><li>{[x.Fruit.Nam]}</li></xml>); |
10 | 9 |
11 return <xml><body> | 10 return <xml><body> |
12 {xml} | 11 {xml} |
13 </body></xml> | 12 </body></xml> |