view 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
line wrap: on
line source
table fruit : { Id : int, Nam : string, Weight : float, Secret : string }

policy query_policy (SELECT fruit.Id, fruit.Nam FROM fruit)

fun main () =
    xml <- queryX (SELECT fruit.Id, fruit.Nam, fruit.Secret
                   FROM fruit)
           (fn x => <xml><li>{[x.Fruit.Secret]}</li></xml>);

    return <xml><body>
      {xml}
    </body></xml>