upsert
inline fun <T : Table> T.upsert(conflictColumn: Column<*>? = null, conflictIndex: Index? = null, body: T.(UpsertStatement<Number>) -> Unit): UpsertStatement<Number>
Performs an UPSERT (INSERT ... ON CONFLICT DO UPDATE) on this Table.
Extension function on Table. Exactly one of conflictColumn or conflictIndex must be provided to identify the unique constraint for conflict detection.
Return
the executed UpsertStatement
Parameters
conflictColumn
the unique column to use for conflict detection
conflictIndex
the unique index to use for conflict detection
body
the insert body specifying column values
Type Parameters
T
the table type