hi, with sqldelight on jvm (postgres) how do i con...
# squarelibraries
n
hi, with sqldelight on jvm (postgres) how do i configure it to use coroutines properly ? i see there is
SuspendingTransacterImpl
but the generated code does not use it
h
The normal driver (JDBC) is blocking. You could use the R2DBC driver for coroutine usage, but the r2dbc driver currently does not support a connection factory but one connection only. And rewriting the r2dbc driver requires major changes, unfortunately.
n
i tried using the r2dbc driver, figured out how to get the connection.. eventually it crashed at runtime though something about not binding the correct amount of parameters
Copy code
Exception in thread "main" java.lang.IndexOutOfBoundsException: Binding index 0 when only 0 parameters are expected
	at io.r2dbc.postgresql.client.Binding.add(Binding.java:75)
	at io.r2dbc.postgresql.PostgresqlStatement.bind(PostgresqlStatement.java:108)
	at io.r2dbc.postgresql.PostgresqlStatement.bind(PostgresqlStatement.java:59)
	at app.cash.sqldelight.driver.r2dbc.R2dbcPreparedStatement.bindLong(R2dbcDriver.kt:204)
in the generated code .. looks to me like the r2dbc driver does not get the parameter number passed correctly ?