]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/metadata/test.ml
rebuilt against ocaml 3.08.3
[helm.git] / helm / ocaml / metadata / test.ml
index 27be47c23cb1c545c14eef1e3241764f9ff66e96..b36ba9176f78369e519f208214ee9e2f444e1256 100644 (file)
@@ -1,23 +1,24 @@
 
-module DB = Dbi_mysql
-
 let _ = Helm_registry.set "getter.mode" "remote";
 let _ = Helm_registry.set "getter.url" "http://mowgli.cs.unibo.it:58081/" in
-let dbh = new DB.connection ~host:"mowgli.cs.unibo.it" ~user:"helm" "matita" in
+let dbd =
+  Mysql.quick_connect ~host:"mowgli.cs.unibo.it" ~user:"helm" ~database:"matita"
+    ()
+in
 let owner =
   try
     Sys.argv.(2)
   with Invalid_argument _ -> "matita_test"
 in
 if Sys.argv.(1) = "clean" then
-  MetadataDb.clean ~dbh ~owner
+  MetadataDb.clean ~dbd ~owner
 else
   let uri_str = Sys.argv.(1) in
   let uri = UriManager.uri_of_string uri_str in
   match CicEnvironment.get_obj uri with
   | Cic.Constant (_, body, ty, _) ->
-      MetadataDb.index_constant ~body ~ty ~uri ~owner ~dbh
+      MetadataDb.index_constant ~body ~ty ~uri ~owner ~dbd
   | Cic.InductiveDefinition (types, _, _) ->
-      MetadataDb.index_inductive_def ~dbh ~owner ~uri ~types
+      MetadataDb.index_inductive_def ~dbd ~owner ~uri ~types
   | _ -> assert false