Companion

Functions

Link copied to clipboard

Create a DatabaseFactory from a DatabaseConfig.

Link copied to clipboard
fun h2File(filePath: String, username: String = "sa", password: String = "", poolSize: Int = 10): DatabaseFactory

Create an H2 file-based database factory.

Link copied to clipboard
fun h2Memory(name: String = "testdb", username: String = "sa", password: String = "", poolSize: Int = 10): DatabaseFactory

Create an H2 in-memory database factory. Useful for testing.

Link copied to clipboard
fun mysql(host: String, port: Int = 3306, database: String, username: String, password: String, poolSize: Int = 10): DatabaseFactory

Create a MySQL database factory.

Link copied to clipboard
fun postgresql(host: String, port: Int = 5432, database: String, username: String, password: String, poolSize: Int = 10): DatabaseFactory

Create a PostgreSQL database factory.

Link copied to clipboard
fun sqlite(filePath: String): DatabaseFactory

Create a SQLite database factory.