if col <> "" then
let f s = col ^ " regexp " ^ quote ("^" ^ s ^ "$") in
if pat then "(" ^ iter f " or " v ^ ")"
- else match v with
- | [s] -> "binary " ^ col ^ " = " ^ (quote s)
- | v -> "binary " ^ col ^ " in (" ^ pg_msval v ^ ")"
+ else match v with
+ | [s] -> col ^ " = " ^ (quote s)
+ | v -> col ^ " in (" ^ pg_msval v ^ ")"
else "1"
in
let pg_cons l = iter pg_con " and " l in
| lt, llf -> " where " ^ pg_cons lt ^ " and " ^ pg_cons_not_l llf
in
if cols = [] then
- let r, q = exec c ("select count (source) from " ^ table ^ pg_where) in
+ let r, q = exec c ("select count(source) from " ^ table ^ pg_where) in
match r with
| [[s]] when int_of_string s > 0 -> [[]], q
- | _ -> [], q
+ | _ -> [], q
else
exec c ("select " ^ pg_cols ^ " from " ^ table ^ pg_where ^
" order by " ^ List.hd cols ^ " asc")
if col <> "" then
let f s = col ^ " ~ " ^ quote ("^" ^ s ^ "$") in
if pat then "(" ^ iter f " or " v ^ ")"
- else match v with
- | [s] -> col ^ " = " ^ (quote s)
- | v -> col ^ " in (" ^ pg_msval v ^ ")"
+ else match v with
+ | [s] -> col ^ " = " ^ (quote s)
+ | v -> col ^ " in (" ^ pg_msval v ^ ")"
else "true"
in
let pg_cons l = iter pg_con " and " l in
| lt, llf -> " where " ^ pg_cons lt ^ " and " ^ pg_cons_not_l llf
in
if cols = [] then
- let r, q = exec c ("select count (source) from " ^ table ^ pg_where) in
+ let r, q = exec c ("select count(source) from " ^ table ^ pg_where) in
match r with
| [[s]] when int_of_string s > 0 -> [[]], q
- | _ -> [], q
+ | _ -> [], q
else
exec c ("select " ^ pg_cols ^ " from " ^ table ^ pg_where ^
" order by " ^ List.hd cols ^ " asc")