Package-level declarations

Types

Link copied to clipboard
open class CustomExpr<T>(val text: String, columnType: IColumnType<T & Any>) : Function<T>

An Exposed Function that embeds raw SQL text as a typed expression in queries.

Link copied to clipboard

Internal holder for the module-level logger.

Link copied to clipboard
class KotlinSqlLogger(val logger: KLogger = ExposedUtils.logger) : SqlLogger

An Exposed SqlLogger that logs SQL statements via a Kotlin KLogger.

Link copied to clipboard
class UpsertStatement<Key : Any>(table: Table, conflictColumn: Column<*>? = null, conflictIndex: Index? = null) : InsertStatement<Key>

An InsertStatement that appends a PostgreSQL ON CONFLICT ... DO UPDATE SET clause.

Functions

Link copied to clipboard

Creates a nullable DateTime from the given SQL text.

Link copied to clipboard
fun dateTimeExpr(str: String): CustomExpr<DateTime>

Creates a non-null DateTime from the given SQL str.

Link copied to clipboard
operator fun ResultRow.get(index: Int): Any

Retrieves a column value from this ResultRow by its zero-based field index.

Link copied to clipboard
fun <T> readonlyTx(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, statement: JdbcTransaction.() -> T): T

Executes a read-only database transaction.

Link copied to clipboard
fun <T> timedReadOnlyTx(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, statement: JdbcTransaction.() -> T): TimedValue<T>

Executes a read-only database transaction and measures its execution time.

Link copied to clipboard
fun <T> timedTransaction(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, statement: JdbcTransaction.() -> T): TimedValue<T>

Executes a database transaction and measures its execution time.

Link copied to clipboard
fun ResultRow.toRowString(): String

Converts this ResultRow to a human-readable string by joining all non-empty column values with " - ".

Link copied to clipboard
inline fun <T : Table> T.upsert(conflictColumn: Column<*>? = null, conflictIndex: Index? = null, body: T.(UpsertStatement<Number>) -> Unit): UpsertStatement<Number>

Performs an UPSERT (INSERT ... ON CONFLICT DO UPDATE) on this Table.