Mercurial > urweb
comparison tests/policy.ur @ 1202:509a6d7b60fb
Iflow tested with positive and negative cases
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 04 Apr 2010 16:17:23 -0400 |
parents | 8793fd48968c |
children | a75c66dd2aeb |
comparison
equal
deleted
inserted
replaced
1201:8793fd48968c | 1202:509a6d7b60fb |
---|---|
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 FROM fruit) |
4 | 4 |
5 fun main () = | 5 fun main () = |
6 xml <- queryX (SELECT fruit.Id, fruit.Nam | 6 xml <- queryX (SELECT fruit.Id, fruit.Nam, fruit.Secret |
7 FROM fruit) | 7 FROM fruit) |
8 (fn x => <xml><li>{[x.Fruit.Nam]}</li></xml>); | 8 (fn x => <xml><li>{[x.Fruit.Secret]}</li></xml>); |
9 | 9 |
10 return <xml><body> | 10 return <xml><body> |
11 {xml} | 11 {xml} |
12 </body></xml> | 12 </body></xml> |