scroll_each
API to work with batches like find_each
#1654
Labels
scroll_each
API to work with batches like find_each
#1654
The current Scroll API provides a method to iterate over each batch. But it does not provide a simple way of iterating over each element.
Much like ActiveRecord's
find_in_batches
has a correspondingfind_each
to hide away the batched nature of the iteration, I thinkscroll
should have a correspondingscroll_each
method. The name is debatable but it brought to mind the existing ActiveRecord API.A simple implementation like this is what I'm imagining:
I'm happy to submit a PR if you're interested in something like this.
The text was updated successfully, but these errors were encountered: