update

Deprecated

ktorm-global will be removed in the future, please migrate to the standard API.

Construct an update expression in the given closure, then execute it and return the effected row count.

Usage:

Employees.update {
set(it.job, "engineer")
set(it.managerId, null)
set(it.salary, 100)
where {
it.id eq 2
}
}

Return

the effected row count.

Parameters

block

the DSL block, an extension function of UpdateStatementBuilder, used to construct the expression.