- query#execute [];
- query#fold_left (* transform the result in a set *)
- (fun set fields ->
- let uri = match fields with [`String uri] -> uri | _ -> assert false in
- StringSet.add uri set)
- StringSet.empty
-
-let at_most ~(dbh:Dbi.connection) ?(where = `Conclusion) only u =
- let inconcl = get_constants dbh ~where u in
+ let result = Mysql.exec dbd query in
+ let set = ref StringSet.empty in
+ Mysql.iter result
+ (fun col ->
+ match col.(0) with
+ | Some uri -> set := StringSet.add uri !set
+ | _ -> assert false);
+ !set
+
+let at_most ~(dbd:Mysql.dbd) ?(where = `Conclusion) only u =
+ let inconcl = get_constants dbd ~where u in