Companion

Companion object provides functions to connect to databases.

Functions

Link copied to clipboard
fun connect(dataSource: DataSource, dialect: SqlDialect = detectDialectImplementation(), logger: Logger = detectLoggerImplementation(), alwaysQuoteIdentifiers: Boolean = false, generateSqlInUpperCase: Boolean? = null): Database

Connect to a database using a DataSource.

fun connect(dialect: SqlDialect = detectDialectImplementation(), logger: Logger = detectLoggerImplementation(), alwaysQuoteIdentifiers: Boolean = false, generateSqlInUpperCase: Boolean? = null, connector: () -> Connection): Database

Connect to a database by a specific connector function.

fun connect(url: String, driver: String? = null, user: String? = null, password: String? = null, dialect: SqlDialect = detectDialectImplementation(), logger: Logger = detectLoggerImplementation(), alwaysQuoteIdentifiers: Boolean = false, generateSqlInUpperCase: Boolean? = null): Database

Connect to a database using the specific connection arguments.

Link copied to clipboard
fun connectWithSpringSupport(dataSource: DataSource, dialect: SqlDialect = detectDialectImplementation(), logger: Logger = detectLoggerImplementation(), alwaysQuoteIdentifiers: Boolean = false, generateSqlInUpperCase: Boolean? = null): Database

Connect to a database using a DataSource with the Spring support enabled.