I'm trying to get sqldelight working in an KMM pro...
# squarelibraries
s
I'm trying to get sqldelight working in an KMM project. Currently it's working well for the Android part, but I'm having some issues with the JVM driver. It seems like there's an issue with running a query in the mapper. Does have an idea of how to handle that?
a
s
It's already wrapped in a transactionWithResult
I tried to switch to 1.4.4, but it doesn't compile. I think it's an issue with having the same function name in different .sq files.
It seems to be an issue with the coroutine extensions. With the same statement,
.executeAsOne()
works,
.asFlow().mapToOne()
does not work.
My fault! I had the transaction wrapper in the wrong place.
.asFlow().map { query.transactionWithResult { it.executeAsOne() } }
seems to work. Oops!
So yeah, it is the same as the issue you linked, adding the transaction works. This is a good solution for me because these sections should be run in a transaction regardless. Thanks for your help!