Equivalent to Rails' find_in_batches
Open
- Dominant language
- Go
- Stars
- 17.2k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
It would be really helpful to have a method that is equivalent to `.All(ctx)` but that returns batches of records that can be iterated over. This would be useful for backfill scripts where I don't want to risk hitting a OOM loading all the data from the DB.
Rails has the `find_in_batches` method that nicely supports this: https://apidock.com/rails/ActiveRecord/Batches/find_in_batches
Contributor guide
Assessment
This issue has not been assessed yet.