# Database

class Database

Class representing the underlying database to which connections are made and on which transaction tasks are performed.

## Types

Companion
Link copied to clipboard
object Companion

## Properties

config
Link copied to clipboard
val config: DatabaseConfig
connector
Link copied to clipboard
val connector: () -> ExposedConnection<*>
defaultFetchSize
Link copied to clipboard
var defaultFetchSize: Int?

The default number of results that should be fetched when queries are executed.

dialect
Link copied to clipboard
val dialect: DatabaseDialect

The name of the database as a DatabaseDialect.

identifierManager
Link copied to clipboard
val identifierManager: IdentifierManagerApi

The database-specific class responsible for parsing and processing identifier tokens in SQL syntax.

name
Link copied to clipboard
val Database.name: String

Returns the name of the database obtained from its connection URL.

supportsAlterTableWithAddColumn
Link copied to clipboard
val supportsAlterTableWithAddColumn: Boolean

Whether the database supports ALTER TABLE with an add column clause.

supportsAlterTableWithDropColumn
Link copied to clipboard
val supportsAlterTableWithDropColumn: Boolean

Whether the database supports ALTER TABLE with a drop column clause.

supportsMultipleResultSets
Link copied to clipboard
val supportsMultipleResultSets: Boolean

Whether the database supports getting multiple result sets from a single execute.

transactionManager
Link copied to clipboard
val Database?.transactionManager: TransactionManager

The TransactionManager instance that is associated with this Database.

url
Link copied to clipboard
val url: String

The connection URL for the database.

useNestedTransactions
Link copied to clipboard
@set:TestOnly
var useNestedTransactions: Boolean

Whether nested transaction blocks are configured to act like top-level transactions.

vendor
Link copied to clipboard
val vendor: String

The name of the database based on the name of the underlying JDBC driver.

version
Link copied to clipboard
val version: BigDecimal

The version number of the database as a BigDecimal.

## Functions

defaultFetchSize
Link copied to clipboard
@TestOnly
fun defaultFetchSize(size: Int): Database
isVersionCovers
Link copied to clipboard
fun isVersionCovers(version: BigDecimal): Boolean

Whether the version number of the database is equal to or greater than the provided version.

toString
Link copied to clipboard
open override fun toString(): String