UpdateBuilder

abstract class UpdateBuilder<out T>(type: StatementType, targets: List<Table>) : Statement<T>

Represents the underlying mapping of columns scheduled for change along with their new values.

Inheritors

Constructors

Link copied to clipboard
constructor(type: StatementType, targets: List<Table>)

Properties

Link copied to clipboard

Whether the SQL statement is meant to be performed as part of a batch execution.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun arguments(): Iterable<Iterable<Pair<IColumnType<*>, Any?>>>

Returns all mappings of columns and expression types to their values needed to prepare an SQL statement.

Link copied to clipboard
open operator fun contains(column: Column<*>): Boolean
Link copied to clipboard
fun execute(transaction: Transaction): T?

Executes the SQL statement directly in the provided transaction and returns the generated result, or null if either no result was retrieved or if the transaction blocked statement execution.

Link copied to clipboard
abstract fun PreparedStatementApi.executeInternal(transaction: Transaction): T?

Determines the exact way that an SQL statement is executed in a transaction and applies any necessary logic before returning the result generated by the executed statement.

Link copied to clipboard
open fun prepared(transaction: Transaction, sql: String): PreparedStatementApi

Uses a transaction connection and an sql string representation to return a precompiled SQL statement, stored as an implementation of PreparedStatementApi.

Link copied to clipboard
abstract fun prepareSQL(transaction: Transaction, prepared: Boolean = true): String

Returns the string representation of an SQL statement.

Link copied to clipboard
open operator fun <S> set(column: Column<S>, value: S)
open operator fun <T, S : T?, E : Expression<S>> set(column: Column<T>, value: E)
open operator fun <S> set(column: Column<S>, value: Query)
@JvmName(name = "setWithEntityIdExpression")
operator fun <S, ID : EntityID<S>, E : Expression<S>> set(column: Column<ID>, value: E)
@JvmName(name = "setWithNullableEntityIdValue")
operator fun <S : Comparable<S>> set(column: Column<EntityID<S>?>, value: S?)
@JvmName(name = "setWithEntityIdValue")
operator fun <S : Comparable<S>> set(column: Column<EntityID<S>>, value: S)
open operator fun <S> set(column: CompositeColumn<S>, value: S)
Link copied to clipboard
open fun <T, S : T?> update(column: Column<T>, value: SqlExpressionBuilder.() -> Expression<S>)

Updates the mapping of the specified column with the value of the provided expression.

open fun <T, S : T?> update(column: Column<T>, value: Expression<S>)

Updates the mapping of the specified column with the specified value if column has not been previously set up for a change and if value is of a valid type.