doUpdate

fun doUpdate(setExpression: String, whereCondition: String? = null)

Updates the existing row.

The assignment is SQL, so the values on the right come from excluded - PostgreSQL's name for the row that could not be inserted - or from the target table, or from anywhere else an expression may look: doUpdate("cognomen = excluded.cognomen, updated_at = now()").

Parameters

setExpression

The SET body, written out.

whereCondition

An optional condition on the update, which is how a conflict resolves to "update only where it is worth updating".


fun doUpdate(vararg setPairs: Pair<String, String>, whereCondition: String? = null)

As doUpdate, with the assignments given as column-to-expression pairs.


fun doUpdate(setMap: Map<String, String>, whereCondition: String? = null)

As doUpdate, with the assignments given as a column-to-expression map.