* http://helm.cs.unibo.it/
*)
+open MetadataTypes
+
open Printf
module DB = Dbi_mysql
-let sort_tbl = "refSort"
-let rel_tbl = "refRel"
-let obj_tbl = "refObj"
-let owners_tbl = "owners"
-let conclno_tbl = "no_inconcl_aux"
-let conclno_hyp_tbl = "no_concl_hyp"
-let name_tbl = "objectName"
-
(* let baseuri = "http://www.cs.unibo.it/helm/schemas/schema-helm#" *)
let baseuri = ""
let inconcl_uri = baseuri ^ "InConclusion"
in
query#execute [];
List.map
- (function [source_col] -> source_col | _ -> assert false)
+ (function [`String source_col] -> source_col | _ -> assert false)
(query#fetchall ())
in
let del_from tbl =
let query =
dbh#prepare (sprintf "DELETE FROM %s WHERE source LIKE \"?%%\"" tbl)
in
- query#execute owned_uris
+ List.iter (fun source_col -> query#execute [`String source_col]) owned_uris
in
List.iter del_from
[sort_tbl; rel_tbl; obj_tbl; conclno_tbl; conclno_hyp_tbl; name_tbl;