cursor batches

This commit is contained in:
Matt Jankowski 2024-11-15 20:21:57 -05:00
parent 5cd852566c
commit 9d57cd4f9e

View File

@ -13,7 +13,9 @@ module ActiveRecord
column_names.unshift(primary_key)
relation = relation.reorder(build_batch_orders(order).to_h).limit(batch_limit)
cursor = Array(primary_key)
relation = relation.reorder(build_batch_orders(cursor, order).to_h).limit(batch_limit)
relation.skip_query_cache!
batch_relation = relation