X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQIMySql.ml;h=170a2dfe548fb065dcd763b00d8930bff0bd3739;hb=4a324741ecde2a78df8d0ef31d197af96b97472d;hp=59d1ccf97751bb7080829988de0114fe68eef39c;hpb=8e0cc60ace0568fef849d0a689ab222010c17e33;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIMySql.ml b/helm/ocaml/mathql_interpreter/mQIMySql.ml index 59d1ccf97..170a2dfe5 100644 --- a/helm/ocaml/mathql_interpreter/mQIMySql.ml +++ b/helm/ocaml/mathql_interpreter/mQIMySql.ml @@ -46,6 +46,7 @@ let quote s = let exec c q = let g = function None -> "" | Some v -> v in let f a = List.map g (Array.to_list a) in +prerr_endline ("###\n" ^ q); Mysql.map ~f:f (Mysql.exec c q), q let exec c table cols ct cfl = @@ -66,7 +67,8 @@ let exec c table cols ct cfl = else "1" in let pg_cons l = iter pg_con " and " l in - let pg_cons_not l = "not (" ^ pg_cons l ^ ")" in + let pg_cons_not l = + match l with [] -> "1" | _ -> "not (" ^ pg_cons l ^ ")" in let pg_cons_not_l ll = iter pg_cons_not " and " ll in let pg_where = match ct, cfl with | [], [] -> ""