diff options
Diffstat (limited to 'tests/ascdesc.ur')
-rw-r--r-- | tests/ascdesc.ur | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ascdesc.ur b/tests/ascdesc.ur new file mode 100644 index 00000000..59dd0169 --- /dev/null +++ b/tests/ascdesc.ur @@ -0,0 +1,10 @@ +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 => <xml>{[r.A]}; </xml>) + +fun main () : transaction page = return <xml><body> + <a link={sortEm True}>Ascending</a><br/> + <a link={sortEm False}>Descending</a> +</body></xml> |