You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 corresponding find_each to hide away the batched nature of the iteration, I think scroll should have a corresponding scroll_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:
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: