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
Process large datasets without loading everything into memory.
Design
// Process records one at a time
model("User").findEach(batchSize=1000, callback=function(user) {
user.sendReminderEmail();
});
// Process in batches
model("User").findInBatches(batchSize=500, callback=function(users) {
processUserBatch(users);
});
Add findEach() to model/read.cfc — internally paginates using findAll(page=n, perPage=batchSize)
Add findInBatches() — passes entire query to callback
Use primary key ordering by default for consistent pagination
Support where, include, and order parameters
Backwards Compatibility
Purely additive new methods.
See design_docs/MODERNIZE-WHEELS-RIM.md §4.6 for full implementation plan.
Activity
feat: add tests and docs for batch processing (#1911)
feat: add TestBox tests and docs for batch processing (#1911)