view tests/view.ur @ 2266:afd12c75e0d6

Do SQL and pure caching in the same pass.
author Ziv Scully <ziv@mit.edu>
date Wed, 14 Oct 2015 15:45:04 -0400
parents 8688e01ae469
children
line wrap: on
line source
table t : { A : int, B : string }

view v = SELECT t.A AS X FROM t

fun main () =
    rows <- queryX (SELECT * FROM v)
            (fn r => <xml><li>{[r.V.X]}</li></xml>);
    return <xml><body>
      {rows}
    </body></xml>