comparison tests/sql_ops.ur @ 559:5d494183ca89

Add SQL arithmetic operators
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Dec 2008 14:41:19 -0500
parents
children
comparison
equal deleted inserted replaced
558:390cba747188 559:5d494183ca89
1 table t : { A : int, B : float }
2
3 val q = (SELECT t.A + t.A AS X, t.B * t.B AS Y FROM t)
4
5 fun main () : transaction page =
6 xml <- queryX q (fn r => <xml>{[r.X]}, {[r.Y]}<br/></xml>);
7 return <xml><body>{xml}</body></xml>
8