table t : { A : int } fun sortEm b = queryX1 (SELECT * FROM t ORDER BY t.A {if b then sql_asc else sql_desc}) (fn r => {[r.A]}; ) fun main () : transaction page = return Ascending
Descending