UpdateStatement

open class UpdateStatement(val targetsSet: ColumnSet, val limit: Int?, val where: Op<Boolean>? = null) : UpdateBuilder<Int>

Represents the SQL statement that updates rows of a table.

Parameters

targetsSet

Column set to update rows from. This may be a Table or a Join instance.

limit

Maximum number of rows to update.

where

Condition that determines which rows to update.

Inheritors

Constructors

Link copied to clipboard
constructor(targetsSet: ColumnSet, limit: Int?, where: Op<Boolean>? = null)

Properties

Link copied to clipboard
open val firstDataSet: List<Pair<Column<*>, Any?>>

The initial list of columns to update with their updated values.

Link copied to clipboard
val limit: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The mapping of columns scheduled for change with their new values.

Link copied to clipboard
val where: Op<Boolean>? = null

Functions

Link copied to clipboard
open override 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
open override fun prepareSQL(transaction: Transaction, prepared: Boolean): 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: AbstractQuery<*>)
@JvmName(name = "setWithEntityIdExpression")
operator fun <S, ID : EntityID<S>, E : Expression<S>> set(column: Column<ID>, value: E)
@JvmName(name = "setWithNullableEntityIdValue")
operator fun <S : Any> set(column: Column<EntityID<S>?>, value: S?)
@JvmName(name = "setWithEntityIdValue")
operator fun <S : Any> 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.