flow

abstract fun <T : Any> flow(returnType: KClass<T>): Flow<T>(source)

Executes the query and emits each row converted to returnType, without accumulating all rows in memory.

The query is executed when the returned Flow is collected.

When fetching a simple scalar type from a single-column query, SQL NULL is kept as a null element even though this cannot be expressed in the Flow<T> type.