From 12cb072c7bbb5119f4328f637add61ae2228b8c7 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 3 Feb 2005 15:12:08 +0000 Subject: [PATCH] owners table not needed --- helm/ocaml/metadata/metadataDb.ml | 17 +++++++++++------ helm/ocaml/metadata/metadataTypes.mli | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/helm/ocaml/metadata/metadataDb.ml b/helm/ocaml/metadata/metadataDb.ml index 441609a1d..32aa329f3 100644 --- a/helm/ocaml/metadata/metadataDb.ml +++ b/helm/ocaml/metadata/metadataDb.ml @@ -28,9 +28,11 @@ open MetadataTypes open Printf let prepare_insert () = + (* let insert_owner a b = sprintf "INSERT %s VALUES (\"%s\", \"%s\")" (owners_tbl ())a b in + *) let insert_sort a b c d = sprintf "INSERT %s VALUES (\"%s\", \"%s\", %d, \"%s\")" (sort_tbl ())a b c d in @@ -40,12 +42,12 @@ let prepare_insert () = let insert_obj a b c d = sprintf "INSERT %s VALUES (\"%s\", \"%s\", \"%s\", %s)" (obj_tbl ()) a b c d in - (insert_owner, insert_sort, insert_rel, insert_obj) + ((*insert_owner, *)insert_sort, insert_rel, insert_obj) -let execute_insert dbd (insert_owner, insert_sort, insert_rel, insert_obj) +let execute_insert dbd ((*insert_owner, *)insert_sort, insert_rel, insert_obj) uri owner (sort_cols, rel_cols, obj_cols) = - ignore (Mysql.exec dbd (insert_owner uri owner)); + (* ignore (Mysql.exec dbd (insert_owner uri owner)); *) List.iter (function | [`String a; `String b; `Int c; `String d] -> ignore (Mysql.exec dbd (insert_sort a b c d)) @@ -114,7 +116,10 @@ let index_inductive_def ~dbd = let clean ~(dbd:Mysql.dbd) ~owner = let owned_uris = (* list of uris in list-of-columns format *) let query = - sprintf "SELECT source FROM %s WHERE owner = \"%s\"" (owners_tbl ()) owner + (* sprintf + * "SELECT source FROM %s WHERE owner = \"%s\"" (owners_tbl ()) + * owner*) + sprintf "SELECT source FROM %s" (obj_tbl ()) in let result = Mysql.exec dbd query in Mysql.map result (fun cols -> @@ -131,7 +136,7 @@ let clean ~(dbd:Mysql.dbd) ~owner = owned_uris in List.iter del_from - [sort_tbl; rel_tbl; obj_tbl; conclno_tbl; conclno_hyp_tbl; name_tbl; - owners_tbl]; + [sort_tbl; rel_tbl; obj_tbl; conclno_tbl; conclno_hyp_tbl; name_tbl(*; + owners_tbl*)]; List.iter Http_getter.unregister owned_uris diff --git a/helm/ocaml/metadata/metadataTypes.mli b/helm/ocaml/metadata/metadataTypes.mli index 1a346595f..2914e97db 100644 --- a/helm/ocaml/metadata/metadataTypes.mli +++ b/helm/ocaml/metadata/metadataTypes.mli @@ -60,7 +60,7 @@ val constr_of_metadata: metadata -> constr val sort_tbl: unit -> string val rel_tbl: unit -> string val obj_tbl: unit -> string -val owners_tbl: unit -> string +(* val owners_tbl: unit -> string *) val conclno_tbl: unit -> string val conclno_hyp_tbl: unit -> string val name_tbl: unit -> string -- 2.39.2