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