https://kotlinlang.org logo
Title
k

Ky

06/16/2022, 3:12 PM
Hey guys, is there a way to set SqlDelights 'asFlow' to run on a particular dispatcher? I'm having trouble with unit tests and I think this may be the culprit
s

Sam

06/16/2022, 3:15 PM
Does
.flowOn(dispatcher)
help?
🇳🇴 1
j

jw

06/16/2022, 3:30 PM
it has an argument to accept a dispatcher
k

Ky

06/16/2022, 8:09 PM
Thanks for the responses. @jw Where exactly does
asFlow()
take an argument. I don’t see it on 1.5.3 https://github.com/cashapp/sqldelight/blob/master/extensions/coroutines-extensions[…]monMain/kotlin/app/cash/sqldelight/coroutines/FlowExtensions.kt
j

jw

06/16/2022, 8:11 PM
Sorry it's the map arguments below. There's no reason to run a query flow on a dispatcher because it's just a notification and not the actual results