| _ -> []
else
exec ("select " ^ pg_cols ^ " from " ^ table ^ pg_where ^
- " order by " ^ List.hd cols ^ " asc")
+ " order by " ^ List.hd cols ^ " asc") (* desc *)
(* Galax backend ***********************************************************)
(* Common functions ********************************************************)
-let pg_result distinct subj el res =
- let res, compose =
- if distinct then List.rev res, U.append_iter else res, U.iter
- in
+let pg_result subj el res =
let get_name = function (p, None) -> p | (_, Some p) -> p in
let names = List.map get_name el in
let mk_grp l = U.grp_iter2 I.grp_make names l in
if subj = "" then I.make "" (mk_grp l)
else I.make (List.hd l) (mk_grp (List.tl l))
in
- compose mk_avs res
+ U.iter mk_avs res
let get_table h mc ct cfl el =
let aux_c ts (_, p, _) = A.refine_tables ts (C.tables h p) in
let cols = if first = "" then other_cols else first :: other_cols in
let low_level = if C.set h C.Galax then gx_query else pg_query in
let result = low_level h (C.resolve h table) cols cons_true cons_false in
- pg_result false first el result
+ pg_result first el result
let deadline = 100