]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaDb.ml
This commit was manufactured by cvs2svn to create tag
[helm.git] / helm / matita / matitaDb.ml
index c5bdbf84befc7dcbf595ed0a5d633b348108acea..b8f91a342f4d40df64c3252b54b8b09a832f964f 100644 (file)
@@ -150,3 +150,19 @@ let remove_uri uri =
   with
     exn -> raise exn (* no errors should be accepted *)
 
+let xpointers_of_ind uri =
+  let dbd = instance () in
+  let name_tbl =  MetadataTypes.name_tbl () in
+  let query = sprintf 
+    "SELECT source FROM %s WHERE source LIKE '%s#xpointer%%'" name_tbl 
+      (Mysql.escape (UriManager.string_of_uri uri))
+  in
+  let rc = Mysql.exec dbd query in
+  let l = ref [] in
+  Mysql.iter rc (fun a ->  match a.(0) with None ->()|Some a -> l := a:: !l);
+  List.map UriManager.uri_of_string !l
+
+let reset_owner_environment () =
+  clean_owner_environment ();
+  create_owner_environment ()
+