]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/mqint.ml
mqint updated
[helm.git] / helm / ocaml / mathql_interpreter / mqint.ml
index f0fd0a7c059172f0c99fb4004e03fe8e7a4a6a57..af3298cce4493df4696656db34c72393934b6cf0 100644 (file)
@@ -77,25 +77,7 @@ let see_prop_pool () =
   (match !prop_pool with Some l -> l | _ -> print_endline "ciao"; assert false)
 ;;
 
-(*
- * inizializzazione della connessione al database
- *)
-let init () =
- let _ = Dbconn.init () in
-  let c = pgc () in
-   let res = 
-    c#exec "select name,id from property where ns_id in (select id from namespace where url='http://www.cs.unibo.it/helm/schemas/mattone.rdf#')"
-   in
-    prop_pool := Some
-     (
-      List.map
-       (function
-           a::b::_ -> (a, b)
-         | _       -> print_endline "no"; assert false
-       )
-       res#get_list
-     )
-;;
+
 
 let get_prop_id prop =
  if prop="refObj" then "F"
@@ -250,38 +232,30 @@ let execute q =
     MQList qq -> xres_to_res (execute_ex [] qq)
 ;;
 
-(*
- * chiusura della connessione al database
- *)
-let close () = Dbconn.close ();;
+let prop_pool = ref None;;
 
 *****************************************************************************)
 
-let prop_pool = ref None;;
-
+let init () = Dbconn.init () 
 (*
- * inizializzazione della connessione al database
-  *)
-  
-
-let init () =
- let _ = Dbconn.init () in
-  let c = pgc () in
-   let res =
-    c#exec "select name,id from property where ns_id in (select id from namespace where url='http://www.cs.unibo.it/helm/schemas/mattone.rdf#')"
+   let c = pgc () in
+   let res = 
+      c#exec "select name,id from property where ns_id in (select id from namespace where url='http://www.cs.unibo.it/helm/schemas/mattone.rdf#')"
    in
    prop_pool := Some
-   (
-    List.map
-    (function
-      a::b::_ -> (a, b)
-      | _       -> print_endline "no"; assert false
-    )
-     res#get_list
-   )
-                                                                         
+     (
+      List.map
+       (function
+           a::b::_ -> (a, b)
+         | _       -> print_endline "no"; assert false
+       )
+       res#get_list
+     )
+*) 
 
+let close () = Dbconn.close ()
 
+let check () = Dbconn.pgc ()
 
 exception BooleExpTrue