English | 简体中文

api-docs / org.ktorm.expression / UpdateExpression

UpdateExpression

data class UpdateExpression : SqlExpression (source code)

Update expression, represents the update statement in SQL.

Constructors

NameSummary

<init>

UpdateExpression(
    table: TableExpression,
    assignments: List<ColumnAssignmentExpression<*>>,
    where: ScalarExpression<Boolean>? = null,
    isLeafNode: Boolean = false,
    extraProperties: Map<String, Any> = emptyMap())

Update expression, represents the update statement in SQL.

Properties

NameSummary

assignments

val assignments: List<ColumnAssignmentExpression<*>>

column assignments of the update statement.

extraProperties

val extraProperties: Map<String, Any>

Extra properties of this expression, maybe useful in SqlFormatter to generate some special SQLs.

isLeafNode

val isLeafNode: Boolean

Check if this expression is a leaf node in expression trees.

table

val table: TableExpression

the table to be updated.

where

the update condition.

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.