connect

fun connect(name: String, params: Map<String, Any?>): Connection

Creates connection with database by name and params

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

Parameters

name

Database driver name

params

List of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included

Throws


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

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

Parameters

name

Database driver name

host

Host of database

user

User of database

password

Password of database user

database

Database name

port

Port of database

params

List of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included

Throws