亀田義裕
2014-Mar-04 09:34 UTC
I can not use find_each to write huge csv because find_in_batch ignores order scope.
This is a feature request.
I can not use ActiveRecord::Batches#find_each to write huge csv because
find_in_batch ignores order scope.
find_in_batch's note say:
# NOTE: It's not possible to set the order. That is automatically set to
# ascending on the primary key ("id ASC") to make the batch ordering
# work.
OK.
But I want to use this method to output csv too, because I want to cut
memory space.
I have an idea to solve this:
- find_each and find_by_batch method receive :use_order_scope option.
How about this?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-core+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.