]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitacleanLib.ml
New module HMysql (to abstract over Mysql and make profiling easier).
[helm.git] / helm / matita / matitacleanLib.ml
index dafd8097cbeb69d66450562c62601587dd35b014..a263a526fd7e05a65855b3413a8eecef3818b630 100644 (file)
@@ -47,15 +47,15 @@ let one_step_depend suri =
       Hashtbl.add cache_of_processed_baseuri buri true;
       let query = 
         let buri = buri ^ "/" in 
-        let buri = Mysql.escape buri in
+        let buri = HMysql.escape buri in
         let obj_tbl = MetadataTypes.obj_tbl () in
         Printf.sprintf 
           "SELECT source, h_occurrence FROM %s WHERE h_occurrence LIKE '%s%%'" obj_tbl buri
       in
       try 
-        let rc = Mysql.exec (MatitaDb.instance ()) query in
+        let rc = HMysql.exec (MatitaDb.instance ()) query in
         let l = ref [] in
-        Mysql.iter rc (
+        HMysql.iter rc (
           fun row -> 
             match row.(0), row.(1) with 
             | Some uri, Some occ when Filename.dirname occ = buri -> 
@@ -152,7 +152,7 @@ let clean_baseuris ?(verbose=true) buris =
     cleaned_no := 0;
     List.iter
      (function table ->
-       ignore (Mysql.exec (MatitaDb.instance ()) ("OPTIMIZE TABLE " ^ table)))
+       ignore (HMysql.exec (MatitaDb.instance ()) ("OPTIMIZE TABLE " ^ table)))
      [MetadataTypes.name_tbl (); MetadataTypes.rel_tbl ();
       MetadataTypes.sort_tbl (); MetadataTypes.obj_tbl();
       MetadataTypes.count_tbl()]