Is there a more typesafe method of configuration f...
# komapper
z
Is there a more typesafe method of configuration for H2 R2DBC?
Copy code
val dbLocation = envOrNull("DB_LOCATION") ?: "./minkinator.db"

    val options = ConnectionFactoryOptions.builder()
        .option(ConnectionFactoryOptions.DRIVER, "h2")
        .option(ConnectionFactoryOptions.PROTOCOL, "file")
        .option(ConnectionFactoryOptions.DATABASE, dbLocation)
        .option(Option.valueOf("DB_CLOSE_DELAY"), "-1")
        .build()

    val db = R2dbcDatabase(options)
t
No, that is the best method.