forEachField

inline fun <T> forEachField(params: Map<String, Any?>, fetchSize: Int, crossinline block: (T) -> Unit)

Streams the result, handing the first column of each row to block as T.

Carries the same constraints as forEachRow.

Parameters

params

Values by parameter name, without the leading @.

fetchSize

Rows per batch, or 0 for the whole result in one. Required — there is no default.

block

Invoked once per value, on the calling thread.

Type Parameters

T

The type the column is mapped to.

Throws

if a value cannot be mapped to T, or wrapping anything block throws that is not an OctaviusException.


inline fun <T> forEachField(vararg params: Pair<String, Any?>, fetchSize: Int, crossinline block: (T) -> Unit)

Same as forEachField, with the values given as Pairs.