DriverManager

Manager of drivers and connections. Can create connection and register Drivers

Functions

Link copied to clipboard
fun connect(name: String, params: Map<String, Any?>): Connection

Creates connection with database by name and params

fun connect(name: String, host: String, user: String? = null, password: String? = null, database: String? = null, port: Int = 3306, params: Map<String, Any?> = emptyMap()): Connection

Creates connection with database

Link copied to clipboard

If database driver not found throws kotlinx.dbc.exceptions.SQLException

Link copied to clipboard
fun register(driver: Driver)

Register new Driver.

Properties

Link copied to clipboard

Parameter name of database name in driver params

Link copied to clipboard
const val PARAMS_HOST: String

Parameter name of database host in driver params

Link copied to clipboard

Parameter name of database user password in driver params

Link copied to clipboard
const val PARAMS_PORT: String

Parameter name of database port in driver params

Link copied to clipboard
const val PARAMS_USER: String

Parameter name of database user in driver params