has anyone tested JVM + postgres + `generateAsync ...
# squarelibraries
n
has anyone tested JVM + postgres +
generateAsync = true
? cause it seems like that
org.postgresql:r2dbc-postgresql
uses ($1, $2 $3) instea of (?, ?, ?) ... and does not even support the latter and i don't think there is a different implementation available ? PS: i already opened a issue on the repo for this
h
You do use the postgres dialect? Because the test doesn’t fail: https://github.com/sqldelight/sqldelight/tree/master/sqldelight-gradle-plugin/src/test/integration-postgresql-async But r2dbc is still beta.
n
do any of those tests pass in a list ? eg
Copy code
WHERE id in :ids
leads to the generated code generating the query at runtime with
createArguments(ids.size)
if thats tested then i must be missing something in my gradle config
Copy code
sqldelight {
    databases {
        create("Database") {
            packageName = "db.queries"
            generateAsync = true // R2dbc is not working yet

            schemaOutputDirectory = layout.buildDirectory.asFile.get().resolve("generated/schema")
            migrationOutputDirectory = layout.buildDirectory.asFile.get().resolve("generated/migrations")
            migrationOutputFileFormat = ".sql" // Defaults to .sql

            val sqlDelightVersion = versionFor("version.app.cash.sqldelight")
            dialect("app.cash.sqldelight:postgresql-dialect:$sqlDelightVersion")
        }
    }
}
h
Nope, it’s not tested because it’s indeed a well known bug
🤔 1
n
well i hope the postgres dialect will support
WHERE id = ANY($1)
in the future.. would allow to bind a array instead of every single parameter too
seems i have to switch back to jdbc for the moment