Ivan
11/06/2020, 8:43 AMBogdan
11/06/2020, 2:58 PMIvan
11/08/2020, 2:46 PMsuspend fun Query.asFlowOnDb(
database: Database,
transactionIsolation: Int? = null
): Flow<ResultRow> {
val q = this
return channelFlow {
val f = this
newSuspendedTransaction (db = database, transactionIsolation = transactionIsolation) {
q.forEach { el -> f.send(el) }
}
}
}