queryForEach
fun <R> queryForEach(sql: String, params: Array<out Any?> = emptyArray(), parameterSerializer: ParameterSerializer, mapper: ResultMapper, fetchSize: Int, transform: (Row) -> R, block: (R) -> Unit)
Uses Extended Query Protocol. Intended for DQL (SELECT). Iterates over rows in batches of fetchSize and applies the given transform and block. A fetchSize of 0 is Execute's own "no limit": one batch carrying the whole result.
Throws
INVALID_ARGUMENT if fetchSize is negative.