| `MainConclusion None
| `MainHypothesis None ->
sprintf "%s.h_position = \"%s\"" cur_tbl pos_str
- | `MainConclusion (Some d)
- | `MainHypothesis (Some d) ->
- sprintf "(%s.h_position = \"%s\" and %s.h_depth = %d)"
- cur_tbl pos_str cur_tbl d)
+ | `MainConclusion (Some r)
+ | `MainHypothesis (Some r) ->
+ let depth = MetadataPp.pp_relation r in
+ sprintf "(%s.h_position = \"%s\" and %s.h_depth %s)"
+ cur_tbl pos_str cur_tbl depth)
(positions :> MetadataTypes.position list)) ^
")"
((n+2), from, where)
let exec ~(dbd:Mysql.dbd) ?rating (n,from,where) =
-let from = String.concat ", " from in
+ let from = String.concat ", " from in
let where = String.concat " and " where in
let query =
match rating with
and table0.source = hits.source order by hits.no desc")
from where
in
- prerr_endline query;
+(* prerr_endline query; *)
let result = Mysql.exec dbd query in
Mysql.map result
(fun row -> match row.(0) with Some s -> s | _ -> assert false)