Walk every matching row, one at a time, without loading them all.
for await (const user of User.iterate({ where: { status: 'active' } })) {
await ship(user);
}
OptionalfindOptions: FindOptionsOptionaloptions: StreamingOptionsThe same rows as a Node Readable in object mode, for pipeline() and the
stream transforms.
await pipeline(
User.stream({ where: { status: 'active' } }),
new BatchTransform({ batchSize: 500 }),
async function* (batches) { for await (const b of batches) yield index(b); },
);
OptionalfindOptions: FindOptionsOptionaloptions: StreamingOptions
Streaming operations available on every model.