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
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))
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 ->
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
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