It looks like there's a proper r2dbc driver for my...
# komapper
d
It looks like there's a proper r2dbc driver for mysql now: https://github.com/asyncer-io/r2dbc-mysql, for now I think Komapper just supported jasync as the driver, no?
t
Thank you for letting me know. Komapper supports jasync, but if there is a need, we can consider supporting asyncer-io/r2dbc-mysql. Do you want to use asyncer-io/r2dbc-mysql?
d
Right now it looks like jasync is working ok, I'm not sure if that implementation might be better, but I did find it here: https://r2dbc.io/drivers/ and it does seem well tested against all the main versions of Mysql and Mariadb, and seems to be built especially for r2dbc, whereas jasync is built mostly as a standalone library that has r2dbc support. If it's complicated to add support it's not pressing, but it might be nice to give a try and compare if it's easy to integrate and give the user a choice between which they rather.
👍 1
t
If you want to try io.asyncer:r2dbc-mysql, please add the following code to your build.gradle.kts.
Copy code
configurations.all {
    resolutionStrategy.dependencySubstitution {
        substitute(module("com.github.jasync-sql:jasync-r2dbc-mysql"))
            .using(module("io.asyncer:r2dbc-mysql:1.1.3"))
    }
}
However, if you are using
java.time.Instant
or
java.time.OffsetDateTime
in your application, it will not work.
d
I use KotlinX datetime's Instant in some places...