@@ -175,61 +175,61 @@ module Tests = functor(Client: Db_interface.DB_ACCESS) -> struct
175175 let dump db g =
176176 let tables = Db_cache_types.Database. tableset db in
177177 Db_cache_types.TableSet. fold_over_recent g
178- (fun c u d name table acc ->
178+ (fun name _ table acc ->
179179 Db_cache_types.Table. fold_over_recent g
180- (fun c u d r acc ->
180+ (fun r { Db_cache_types.Stat. created; modified; deleted } _ acc ->
181181 let s =
182182 try
183183 let row = Db_cache_types.Table. find r table in
184184 let s = Db_cache_types.Row. fold_over_recent g
185- (fun c u d k v acc ->
185+ (fun k _ v acc ->
186186 Printf. sprintf " %s %s=%s" acc k v) row " " in
187187 s
188188 with _ -> " (deleted)"
189189 in
190- Printf. printf " %s(%s): (%Ld %Ld %Ld) %s\n " name r c u d s;
191- () )
192- ( fun () -> () ) table () ) tables ()
190+ Printf. printf " %s(%s): (%Ld %Ld %Ld) %s\n " name r created modified deleted s;
191+ ()
192+ ) table () ) tables ()
193193 in
194194
195195 let get_created db g =
196196 let tables = Db_cache_types.Database. tableset db in
197197 Db_cache_types.TableSet. fold_over_recent g
198- (fun c u d name table acc ->
198+ (fun name _ table acc ->
199199 Db_cache_types.Table. fold_over_recent g
200- (fun c u d r acc ->
201- if c > = g then (name,r)::acc else acc) ignore table acc
200+ (fun r { Db_cache_types.Stat. created } _ acc ->
201+ if created > = g then (name,r)::acc else acc) table acc
202202 ) tables []
203203 in
204204
205205 let get_updated db g =
206206 let tables = Db_cache_types.Database. tableset db in
207207 Db_cache_types.TableSet. fold_over_recent g
208- (fun c u d name table acc ->
208+ (fun name _ table acc ->
209209 Db_cache_types.Table. fold_over_recent g
210- (fun c u d r acc ->
210+ (fun r _ _ acc ->
211211 let row = Db_cache_types.Table. find r table in
212212 Db_cache_types.Row. fold_over_recent g
213- (fun c u d k v acc ->
213+ (fun k _ v acc ->
214214 (r,(k,v))::acc) row acc)
215- ignore table acc) tables []
215+ table acc) tables []
216216 in
217217
218218 let get_deleted db g =
219219 let tables = Db_cache_types.Database. tableset db in
220220 Db_cache_types.TableSet. fold_over_recent g
221- (fun c u d name table acc ->
222- Db_cache_types.Table. fold_over_recent g
223- (fun c u d r acc ->
224- if d > g then r::acc else acc)
225- ignore table acc) tables []
221+ (fun name _ table acc ->
222+ Db_cache_types.Table. fold_over_deleted g
223+ (fun r { Db_cache_types.Stat. deleted } acc ->
224+ if deleted > g then r::acc else acc)
225+ table acc) tables []
226226 in
227227
228228 let get_max db =
229229 let tables = Db_cache_types.Database. tableset db in
230230 Db_cache_types.TableSet. fold_over_recent (- 1L )
231- (fun c u d _ _ largest ->
232- max c (max u (max d largest))) tables (- 1L )
231+ (fun _ { Db_cache_types.Stat. created; modified; deleted } _ largest ->
232+ max created (max modified (max deleted largest))) tables (- 1L )
233233 in
234234
235235 let db = Db_ref. get_database t in
0 commit comments