execute

abstract fun execute()

Executes the DELETE statement.

This is the final step in the DELETE statement builder chain. It compiles and runs the SQL query against the database, deleting the rows that match the specified criteria.

Unlike executeReturning, this function does not return any data from the deleted rows and is used for fire-and-forget delete operations.

Example:

// Deletes all users marked as "suspended"
MyTable.delete()
.where { it.status EQ "suspended" }
.execute()

Author

MOHAMMAD AZIM ANSARI

See also