English | 简体中文

api-docs / org.ktorm.support.postgresql / InsertOrUpdateExpression

InsertOrUpdateExpression

data class InsertOrUpdateExpression : SqlExpression (source code)

Insert or update expression, represents an insert statement with an
on conflict (key) do update set clause in PostgreSQL.

Constructors

NameSummary

<init>

InsertOrUpdateExpression(
    table: TableExpression,
    assignments: List<ColumnAssignmentExpression<*>>,
    conflictColumns: List<ColumnExpression<*>> = emptyList(),
    updateAssignments: List<ColumnAssignmentExpression<*>> = emptyList(),
    returningColumns: List<ColumnExpression<*>> = emptyList(),
    isLeafNode: Boolean = false,
    extraProperties: Map<String, Any> = emptyMap())

Insert or update expression, represents an insert statement with an
on conflict (key) do update set clause in PostgreSQL.

Properties

NameSummary

assignments

val assignments: List<ColumnAssignmentExpression<*>>

the inserted column assignments.

conflictColumns

val conflictColumns: List<ColumnExpression<*>>

the index columns on which the conflict may happen.

extraProperties

val extraProperties: Map<String, Any>

Extra properties of this expression, maybe useful in SqlFormatter to generate some special SQLs.

isLeafNode

val isLeafNode: Boolean

Check if this expression is a leaf node in expression trees.

returningColumns

val returningColumns: List<ColumnExpression<*>>

the returning columns.

table

val table: TableExpression

the table to be inserted.

updateAssignments

val updateAssignments: List<ColumnAssignmentExpression<*>>

the updated column assignments while any key conflict exists.