UpsertStatement
class UpsertStatement<Key : Any>(table: Table, conflictColumn: Column<*>? = null, conflictIndex: Index? = null) : InsertStatement<Key>
An InsertStatement that appends a PostgreSQL ON CONFLICT ... DO UPDATE SET clause.
Generates SQL that inserts a row, and on conflict with the specified column or index constraint, updates all non-conflict columns to the EXCLUDED values.
Parameters
table
the target table
conflictColumn
the unique column for conflict detection (mutually exclusive with conflictIndex)
conflictIndex
the unique index for conflict detection (mutually exclusive with conflictColumn)
Type Parameters
Key
the auto-generated key type
Throws
if neither conflictColumn nor conflictIndex is provided