Database

open class Database @JvmOverloads constructor(val dataSource: DataSource, var label: String, var defaultSchemaName: String? = null) : DatabaseIfc(source)

Inheritors

Constructors

Link copied to clipboard
constructor(dataSource: DataSource, label: String, defaultSchemaName: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
override val dataSource: DataSource

the DataSource backing the database

Link copied to clipboard
override val dbURL: String?

The URL used to establish the connection to the database.

Link copied to clipboard
override var defaultSchemaName: String?

Sets the name of the default schema

Link copied to clipboard
override var label: String

identifying string representing the database. This has no relation to the name of the database on disk or in the dbms. The sole purpose is for labeling of output

Link copied to clipboard

A connection that is meant to be used many times before manual closing. Many functions rely on this connection as their default connection. Do not close this connection unless you are really finished with the database. Since, this property is final it cannot be restored after closing.

Link copied to clipboard

Functions

Link copied to clipboard
override fun getConnection(): Connection

It is best to use this function within a try-with-resource construct This method calls the DataSource for a connection from the underlying DataSource. You are responsible for closing the connection.

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