forEachRow
Streams the result, handing each row to block as it arrives.
Rows reach block one at a time and none are kept, so memory stays flat however large the result is; fetchSize governs the other side of it - how many rows the server sends before pausing for the next batch, or the whole result at once under 0. The whole iteration is one running statement: statement_timeout covers time spent inside block, and block must not issue another query on this same session.
Parameters
Values by parameter name, without the leading @.
Rows per batch, or 0 for the whole result in one. Required — there is no default.
Invoked once per row, on the calling thread.
Throws
CONVERSION_ERROR wrapping anything block throws that is not an OctaviusException, since the result has to be drained before it can be rethrown.
Same as forEachRow, with the values given as Pairs.