DatabaseOnConflictClauseBuilder

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
internal var action: String?

Defines the conflict target as an existing constraint name.

Link copied to clipboard
internal var target: String?

Defines the conflict target as a list of columns.

Functions

Link copied to clipboard

Creates a copy of this ON CONFLICT clause builder.

Link copied to clipboard
open override fun doNothing()

In case of conflict, do nothing (DO NOTHING).

Link copied to clipboard
open override fun doUpdate(vararg setPairs: Pair<String, String>, whereCondition: String?)

Defines the DO UPDATE action using column-value pairs.

open override fun doUpdate(setExpression: String, whereCondition: String?)

Defines the DO UPDATE action using a raw SET expression. Use EXCLUDED to reference the values that were attempted to insert.

open override fun doUpdate(setMap: Map<String, String>, whereCondition: String?)

Defines the DO UPDATE action using a map. Useful when the update columns are determined at runtime, e.g., when only non-null fields of a patch request should be updated.

Link copied to clipboard
open override fun onColumns(vararg columns: String)

Defines the conflict target (columns).

Link copied to clipboard
open override fun onConstraint(constraintName: String)

Defines the conflict target (constraint name).