X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2FmatitaDb.ml;h=b8f91a342f4d40df64c3252b54b8b09a832f964f;hb=b05dceab1903f9d15f214a9ddeaf791cd594e215;hp=c5bdbf84befc7dcbf595ed0a5d633b348108acea;hpb=76c28672a95473ee68935a7ca09b69f9b2f9cdc8;p=helm.git diff --git a/helm/matita/matitaDb.ml b/helm/matita/matitaDb.ml index c5bdbf84b..b8f91a342 100644 --- a/helm/matita/matitaDb.ml +++ b/helm/matita/matitaDb.ml @@ -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 () +