where
Adds a WHERE clause to the DELETE statement.
This function specifies the conditions that identify which rows to delete. The clause is defined within a lambda expression, providing a type-safe way to build the conditions using the table's columns.
This function can be called only once per DeleteStatement. Subsequent calls will override the previously set WHERE clause.
Example:
MyTable.delete()
.where {
(it.status EQ "inactive") AND (it.loginAttempts GTE 5)
}.execute()Content copied to clipboard
Return
The DeleteStatement instance for further chaining of methods like orderBy or limit
Author
MOHAMMAD AZIM ANSARI
Parameters
clause
A lambda expression that defines the conditions for the WHERE clause. The lambda receives an instance of the table T to access its columns.