]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/utility.ml
debian version 0.4.3 (maybe, not tested)
[helm.git] / helm / ocaml / mathql_interpreter / utility.ml
index e3776cfbd1ff5e4ff5090016b41e0a4dcf449096..af99d72fe25df2d47dfe0a5ad00d37c93c3419f4 100644 (file)
@@ -20,7 +20,7 @@
  * MA  02111-1307, USA.
  * 
  * For details, see the HELM World-Wide-Web page,
- * http://cs.unibo.it/helm/.
+ * http://www.cs.unibo.it/helm/.
  *)
 
 (*
@@ -95,13 +95,13 @@ let set_assoc x v l =
  *
  * output: string; id interno associato alla proprieta'
  *)
-let helm_property_id p =
- let c = pgc () in
+let helm_property_id handle p =
+ let c = MQIConn.pgc handle in
   let q1 = "select att0 from namespace where att1='http://www.cs.unibo.it/helm/schemas/mattone.rdf#'" in
    let ns = pgresult_to_string (c#exec q1) in
     let q2 = ("select att0 from property where att2='" ^ p ^ "' and att1=" ^ ns) in
      let retval = pgresult_to_string (c#exec q2) in
-     (*let _ = print_endline ("utility:q2: "  ^ q2 ^ " : " ^ retval) in*)
+     (*let _ = prerr_endline ("utility:q2: "  ^ q2 ^ " : " ^ retval) in*)
       retval
 ;;
 
@@ -111,8 +111,8 @@ let helm_property_id p =
  *
  * output: string; id interno associato alla classe
  *)
-let helm_class_id cl =
- let c = pgc () in
+let helm_class_id handle cl =
+ let c = MQIConn.pgc handle in
   let ns = pgresult_to_string (c#exec ("select att0 from namespace where att1='http://www.cs.unibo.it/helm/schemas/mattone.rdf#'")) in
    pgresult_to_string (c#exec ("select att0 from class where att2='" ^ cl ^ "' and att1=" ^ ns))
 ;;