Iliyan Germanov
04/14/2023, 4:01 PMSqlDriver
that is persistent and works on Desktop (Linux, Windows, MacOS)? Here's the Github repo. Best I can do is in-memory one:
import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver
import ivy.Database
actual class SQLDelightDriverFactory {
actual fun createDriver(): SqlDriver {
val driver: SqlDriver = JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY)
Database.Schema.create(driver)
return driver
}
}
Casey Brooks
04/14/2023, 4:17 PMjdbc:sqlite:PATH/TO/SQLITE/database.db
instead of <http://JdbcSqliteDriver.IN|JdbcSqliteDriver.IN>_MEMORY
. It’s up to you to make sure that file exists, and perform the necessary migrations
At one point, I recall having some issues with the default JDBC connection string, but I was able to make it work using HikariCP instead. Give the default connection a try first, but if that’s not working give HikariCP a goIliyan Germanov
04/14/2023, 4:29 PM