module ActiveRecord::Batches
def apply_finish_limit(relation, cursor, finish, batch_orders)
def apply_finish_limit(relation, cursor, finish, batch_orders) operators = batch_orders.map do |_column, order| order == :desc ? :gteq : :lteq end batch_condition(relation, cursor, finish, operators) end