ent / ent/ent

Equivalent to Rails' find_in_batches

Open
#4,264 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.