Has anyone tried to use SqlDelight's flow extension on Native lately? I have a multiplatform project (Android/iOS), where flow is working w/o issues on Android, but not on iOS. No related logs or crashes. SqlDelight version 1.4.0 (tried with 1.3.0 as well)
Myroslav Kolodii
06/26/2020, 2:27 PM
Code itself is simple
Copy code
override fun subscribeToAll(): Flow<List<UserDevice>> {
return queries.selectAll().asFlow().mapToList().map { list ->
list.map { it.toUserDevice() }
}
}
a
alec
06/26/2020, 2:38 PM
we should probably add tests to the flow extension artifact that run on all platforms
alec
06/26/2020, 2:38 PM
i havent worked with native coroutines so i don’t know the answer to your question unfortunately
alec
06/26/2020, 2:38 PM
@basher or @kpgalligan might
k
kpgalligan
06/26/2020, 2:44 PM
If you’re not using the mutlithreaded coroutines, they very likely won’t work as expected. That is an issue that should be explained better.