File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/extensions/ocsipersist-pgsql Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -253,15 +253,15 @@ let rec list_last l =
253253 | [] -> assert false
254254
255255let rec iter_rec f table last =
256- let query =
256+ let ( query, args) =
257257 match last with
258258 | None ->
259- sprintf " SELECT * FROM %s ORDER BY key LIMIT 1000" table
259+ ( sprintf " SELECT * FROM %s ORDER BY key LIMIT 1000" table, [] )
260260 | Some last ->
261- sprintf " SELECT * FROM %s WHERE key > %s ORDER BY key LIMIT 1000"
262- table last
261+ ( sprintf " SELECT * FROM %s WHERE key > $1 ORDER BY key LIMIT 1000" table,
262+ [ Key last])
263263 in
264- (use_pool @@ fun db -> exec db query [] ) >> = fun l ->
264+ (use_pool @@ fun db -> exec db query args ) >> = fun l ->
265265 Lwt_list. iter_s
266266 (fun row -> let key, value = key_value_of_row row in f key value) l
267267 >> = fun () ->
You can’t perform that action at this time.
0 commit comments