]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/mQIPostgres.ml
- reindented
[helm.git] / helm / ocaml / mathql_interpreter / mQIPostgres.ml
index cf82814e9fe0edf75d3ba46d3c2b8c1245f9691a..f983a5862fcee334b88c3fbb0b894a1dbb991424 100644 (file)
@@ -59,9 +59,9 @@ let exec c table cols ct cfl =
       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
@@ -74,10 +74,10 @@ let exec c table cols ct cfl =
       | 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")