]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/utility.ml
MQueryInterpreter: interface updated
[helm.git] / helm / ocaml / mathql_interpreter / utility.ml
index c749f951b6b5c3f3b25e2226f1ab5e8cd60ab8f6..af99d72fe25df2d47dfe0a5ad00d37c93c3419f4 100644 (file)
@@ -95,8 +95,8 @@ 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
@@ -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))
 ;;