← Back to Stormify Documentation

forEachStreaming

fun forEachStreaming(spec: PageSpec, action: (T) -> Unit)

Streams every row matching the filters/sorts/constraints in spec through action via a database cursor. Uses the same chunked sibling-batching as PagedList.forEachStreaming: FK touches inside action resolve in batches of onl.ycode.stormify.SiblingGroup.DEFAULT_BATCH_SIZE, not one-per-row.

The page and pageSize fields on spec are ignored — streaming iterates every matching row. Caller is responsible for bounding the result via filters / constraints.