Update Statement
Represents a configurable UPDATE statement in the KQLite DSL.
This interface provides a fluent API to build and execute UPDATE queries. Instances are typically created by calling the update extension function on a KQLiteTable.
It allows for specifying WHERE clauses, ordering, limits, and executing the statement to either perform the update or retrieve the updated rows.
Example Usage:
// Update the salary for all employees in the "Sales" department,
// ordered by their hire date, and limit the update to the first 10.
Employees
.update {
it.salary to (it.salary * 1.1) // 10% raise
}.where { it.department EQ "Sales" }
.orderBy(Employees.hireDate, sort = Sort.DESC)
.limit(10)
.execute()Author
MOHAMMAD AZIM ANSARI
Type Parameters
The type of the KQLiteTable this statement operates on.
See also
Functions
Executes the UPDATE statement and returns a KQLiteCursor containing the specified columns from the rows that were modified.
Adds a FROM clause to the UPDATE statement, allowing updates based on values from another query.
Adds a LIMIT clause to the UPDATE statement without OFFSET. Same as calling limit(limit, -1)
Adds a LIMIT and optional OFFSET clause to the UPDATE statement.
Adds an ORDER BY clause to the UPDATE statement for single column and default sorting.
Adds an ORDER BY clause to the UPDATE statement using OrderColumn objects. Same as calling orderBy(column, null)
Adds an ORDER BY clause to the UPDATE statement.
Adds an ORDER BY clause to the UPDATE statement using one or more OrderColumn objects.