doUpdate
In case of conflict, perform an update (DO UPDATE).
Parameters
setExpression
SET expression. Use EXCLUDED to reference the values that were attempted to insert. E.g., "tribute_amount = EXCLUDED.tribute_amount".
whereCondition
Optional WHERE condition for the UPDATE action.
In case of conflict, perform an update (DO UPDATE) using column-value pairs. Preferred over the string overload — more readable and less error-prone.
doUpdate(
"tribute_amount" to "EXCLUDED.tribute_amount",
"last_collected_at" to "NOW()"
)Content copied to clipboard
Parameters
setPairs
Pairs (column, expression) to use in the SET clause.
whereCondition
Optional WHERE condition for the UPDATE action.
In case of conflict, perform an update (DO UPDATE) using a column-value map. Useful when update logic is built dynamically.
Parameters
setMap
Map {column -> expression} to use in the SET clause.
whereCondition
Optional WHERE condition for the UPDATE action.