# ExposedDatabaseMetadata

abstract class ExposedDatabaseMetadata(val database: String)

Base class responsible for retrieving and storing information about the JDBC driver and underlying database.

## Constructors

ExposedDatabaseMetadata
Link copied to clipboard
constructor(database: String)

## Properties

database
Link copied to clipboard
val database: String
databaseDialectName
Link copied to clipboard
abstract val databaseDialectName: String

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

databaseProductVersion
Link copied to clipboard
abstract val databaseProductVersion: String

The version number of the database product as a `String`.

defaultIsolationLevel
Link copied to clipboard
abstract val defaultIsolationLevel: Int

The default transaction isolation level for the database.

identifierManager
Link copied to clipboard
abstract val identifierManager: IdentifierManagerApi

The database-specific and metadata-reliant implementation of IdentifierManagerApi.

schemaNames
Link copied to clipboard
abstract val schemaNames: List<String>

A list of existing schema names.

supportsAlterTableWithAddColumn
Link copied to clipboard
abstract val supportsAlterTableWithAddColumn: Boolean

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

supportsAlterTableWithDropColumn
Link copied to clipboard
abstract val supportsAlterTableWithDropColumn: Boolean

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

supportsMultipleResultSets
Link copied to clipboard
abstract val supportsMultipleResultSets: Boolean

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

supportsSelectForUpdate
Link copied to clipboard
abstract val supportsSelectForUpdate: Boolean

Whether the database supports `SELECT FOR UPDATE` statements.

tableNames
Link copied to clipboard
abstract val tableNames: Map<String, List<String>>

A mapping of all schema names in the database to a list of all defined table names in each schema.

url
Link copied to clipboard
abstract val url: String

The connection URL for the database.

version
Link copied to clipboard
abstract val version: BigDecimal

The version number of the database as a `BigDecimal`.

## Functions

cleanCache
Link copied to clipboard
abstract fun cleanCache()

Clears any cached values.

columns
Link copied to clipboard
abstract fun columns(vararg tables: Table): Map<Table, List<ColumnMetadata>>

Returns a map with the ColumnMetadata of all the defined columns in each of the specified tables.

existingIndices
Link copied to clipboard
abstract fun existingIndices(vararg tables: Table): Map<Table, List<Index>>

Returns a map with all the defined indices in each of the specified tables.

existingPrimaryKeys
Link copied to clipboard
abstract fun existingPrimaryKeys(vararg tables: Table): Map<Table, PrimaryKeyMetadata?>

Returns a map with the PrimaryKeyMetadata in each of the specified tables.

resetCurrentScheme
Link copied to clipboard
abstract fun resetCurrentScheme()

Clears and resets any stored information about the database's current schema to default values.

sequences
Link copied to clipboard
abstract fun sequences(): List<String>

Returns a list of the names of all sequences in the database.

tableConstraints
Link copied to clipboard
abstract fun tableConstraints(tables: List<Table>): Map<String, List<ForeignKeyConstraint>>

Returns a map with the ForeignKeyConstraint of all the defined columns in each of the specified tables, with the table name used as the key.

tableNamesByCurrentSchema
Link copied to clipboard
abstract fun tableNamesByCurrentSchema(tableNamesCache: Map<String, List<String>>?): SchemaMetadata

Returns the current schema name and a list of its existing table names, stored as SchemaMetadata.