letf()=if!firstthen(first:=false;" WHERE ")else" AND "
in
letq=matchidwith
|None->q|Someb->q^(f())^"loc.id=?"in
|None->q|Some_b->q^(f())^"loc.id=?"in
letq=matchfilewith
|None->q|Someb->q^(f())^"loc.file=?"in
|None->q|Some_b->q^(f())^"loc.file=?"in
letq=matchlinewith
|None->q|Someb->q^(f())^"loc.line=?"in
|None->q|Some_b->q^(f())^"loc.line=?"in
letq=matchstartwith
|None->q|Someb->q^(f())^"loc.start=?"in
|None->q|Some_b->q^(f())^"loc.start=?"in
letq=matchstopwith
|None->q|Someb->q^(f())^"loc.stop=?"in
|None->q|Some_b->q^(f())^"loc.stop=?"in
letq=matchcustom_wherewith
|"",_->q|w,_->q^(f())^"("^w^")"in
letsql=
...
...
@@ -717,7 +717,7 @@ module Goal = struct
end
*)
letfrom_iddbid:goal=
letfrom_id_db_id:goal=
assertfalse
(*
let sql="SELECT goal.id, goal.task_checksum, goal.parent_id, goal.name, goal.pos_id, goal.proved, goal_pos.id, goal_pos.file, goal_pos.line, goal_pos.start, goal_pos.stop, goal_parent.id, goal_parent.name, goal_parent.obsolete FROM goal LEFT JOIN transf AS goal_parent ON (goal_parent.id = goal.parent_id) LEFT JOIN loc AS goal_pos ON (goal_pos.id = goal.pos_id) " ^ q in