comparison src/cjr_print.sml @ 1168:69f1d39d3f2d

Use COALESCE to hide NULL results of aggregate functions; fix bug with improper ordering of query result columns
author Adam Chlipala <adamc@hcoop.net>
date Thu, 25 Feb 2010 14:55:35 -0500
parents 8679ba87cf3c
children fd1a49b51db5
comparison
equal deleted inserted replaced
1167:5eca51fcd559 1168:69f1d39d3f2d
1655 val exps = map (fn (x, t) => ("__uwf_" ^ ident x, t)) exps 1655 val exps = map (fn (x, t) => ("__uwf_" ^ ident x, t)) exps
1656 val tables = ListUtil.mapConcat (fn (x, xts) => 1656 val tables = ListUtil.mapConcat (fn (x, xts) =>
1657 map (fn (x', t) => ("__uwf_" ^ ident x ^ ".__uwf_" ^ ident x', t)) xts) 1657 map (fn (x', t) => ("__uwf_" ^ ident x ^ ".__uwf_" ^ ident x', t)) xts)
1658 tables 1658 tables
1659 1659
1660 val outputs = exps @ tables 1660 val sort = ListMergeSort.sort (fn ((s1, _), (s2, _)) => String.compare (s1, s2) = GREATER)
1661 val outputs = ListMergeSort.sort (fn ((s1, _), (s2, _)) => String.compare (s1, s2) = GREATER) outputs 1661 val outputs = sort exps @ sort tables
1662 1662
1663 val wontLeakStrings = notLeaky env true state 1663 val wontLeakStrings = notLeaky env true state
1664 val wontLeakAnything = notLeaky env false state 1664 val wontLeakAnything = notLeaky env false state
1665 1665
1666 val inputs = 1666 val inputs =