X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaDb.ml;h=17aac37450cf091faad1fbaced5d1589eb89f408;hb=ed207660b8a0fa34f1d34b9dbb41144c5be29e68;hp=423fa2b5a0b7ddba659d8f9c742f2ef2eda47283;hpb=0d681e06c6ced0be7f9dbce417684b082229745a;p=helm.git diff --git a/helm/matita/matitaDb.ml b/helm/matita/matitaDb.ml index 423fa2b5a..17aac3745 100644 --- a/helm/matita/matitaDb.ml +++ b/helm/matita/matitaDb.ml @@ -112,7 +112,7 @@ let create_owner_environment () = (* removes uri from the ownerized tables, and returns the list of other objects * (theyr uris) that ref the one removed. * AFAIK there is no need to return it, since the MatitaTypes.staus should - * contain all defined objects. but to double ckeck we do not garbage the + * contain all defined objects. but to double check we do not garbage the * metadata... *) let remove_uri uri = @@ -150,3 +150,14 @@ 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