Jdbc Data Source
JDBC DataSource wrapper that implements KDBC DataSource interface.
initSql is a single SQL statement executed on every freshly opened connection before it is returned to the caller — equivalent to HikariCP's connectionInitSql. If the statement fails the connection is closed and the exception propagates.
Usage:
val hikariDS = HikariDataSource(config)
val stormify = Stormify(hikariDS) // Uses convenience function
// or
val stormify = Stormify(JdbcDataSource(hikariDS, initSql = "PRAGMA foreign_keys = ON"))Content copied to clipboard