StreamingTerminalMethods

Functions

Link copied to clipboard
abstract fun forEachRow(params: Map<String, Any?> = emptyMap(), action: (row: Map<String, Any?>) -> Unit): DataResult<Unit>

Executes the query and processes each row individually using the provided action, without loading the entire result into memory. Ideal for large datasets. Returns DataResult.Success(Unit) if the operation succeeded or DataResult.Failure in case of error.

Link copied to clipboard
fun StreamingTerminalMethods.forEachRow(vararg params: Pair<String, Any?>, action: (row: Map<String, Any?>) -> Unit): DataResult<Unit>
Link copied to clipboard
abstract fun <T : Any> forEachRowOf(kClass: KClass<T>, params: Map<String, Any?>, action: (obj: T) -> Unit): DataResult<Unit>

Executes the query and processes each row individually using the provided action, without loading the entire result into memory. Ideal for large datasets. Returns DataResult.Success(Unit) if the operation succeeded or DataResult.Failure in case of error.

Link copied to clipboard
inline fun <T : Any> StreamingTerminalMethods.forEachRowOf(vararg params: Pair<String, Any?>, noinline action: (obj: T) -> Unit): DataResult<Unit>
inline fun <T : Any> StreamingTerminalMethods.forEachRowOf(params: Map<String, Any?> = emptyMap(), noinline action: (obj: T) -> Unit): DataResult<Unit>