DoUpdate<Row extends Object, RS extends GeneratedTable<Row, RS>> class final

A DoUpdate upsert clause can be used to insert or update a custom companion when the underlying companion already exists.

For an example, see InsertStatement.insert.

Inheritance

Constructors

DoUpdate(Insertable<Row> update(RS old), {List<TableColumn<Object>>? target, Expression<bool> where(RS old)?, Expression<bool> targetCondition(RS old)?})
Creates a DO UPDATE clause.
DoUpdate.withExcluded(Insertable<Row> update(RS old, RS excluded), {List<TableColumn<Object>>? target, Expression<bool> targetCondition(RS old)?, Expression<bool> where(RS old, RS excluded)?})
Creates a DO UPDATE clause.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → List<TableColumn<Object>>?
An optional list of columns to serve as an "conflict target", which specifies the uniqueness constraint that will trigger the upsert.
final
targetCondition → Expression<bool> Function(RS old)?
Only applies the DoUpdate if the target table matches a condition.
final
usesExcludedTable → bool
Whether the insertable, where or targetCondition use both the old and the excluded rows.
final
where → WhereClause Function(RS old, RS excluded)?
Change the DoUpdate into a no-op if where evaluates to false.f
final

Methods

compileWith(StatementCompiler compiler) → void
Compiles this component with the given StatementCompiler by invoking the relevant add method on it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited