replace

open fun replace(table: Table, columns: List<Column<*>>, expression: String, transaction: Transaction, prepared: Boolean = true): String

Returns the SQL command that either inserts a new row into a table, or, if insertion would violate a unique constraint, first deletes the existing row before inserting a new row.

Note: This operation is not supported by all vendors, please check the documentation.

Parameters

table

Table to either insert values into or delete values from then insert into.

columns

Columns to replace the values in.

expression

Expression with the values to use in replace.

transaction

Transaction where the operation is executed.