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

Represents an UPDATE statement in sql.

Inheritance

Constructors

UpdateStatement(DatabaseConnectionUser _database, GeneratedTable<Row, RS> table)
Used internally by drift to construct an update statement

Properties

dialectSpecificOptions → Map<Symbol, Object?>
A map of dialect-specific options.
finalinherited
fromClause ↔ FromClause?
The fromClause of this update statement
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
resultSet → GeneratedTable<Row, RS>
The table from which rows should be updated.
no setter
returning ↔ ReturningClause?
An optional RETURNING clause part of this statement.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
table → GeneratedTable<Row, RS>
The primary table affected by this statement.
finalinherited
updatedColumns → Map<String, Expression<Object>>
The columns set by this update statement.
final
whereClause ↔ WhereClause?
The WhereClause filtering rows for this statement.
getter/setter pairinherited

Methods

asSelf() → UpdateStatement<Row, RS>
Returns this as Self.
compileWith(StatementCompiler compiler) → void
Compiles this component with the given StatementCompiler by invoking the relevant add method on it.
override
from(ResultSet<Object, ResultSet<Object, dynamic>> resultSet) → void
Adds a Table or Subquery to the from clause of this update statement
join(Iterable<Join> joins) → void
Adds joins to the from claus of this update statement
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareReplace(Insertable<Row> entity) → void
Update this statement to generate the SQL for a replace call.
replace(Insertable<Row> entity) → Future<bool>
Replaces the old version of entity that is stored in the database with the fields of the entity provided here. This implicitly applies a where clause to rows with the same primary key as entity, so that only the row representing outdated data will be replaced.
returningAll() → void
Adds a RETURNING * clause to this insert statement.
inherited
returningOnly(List<Expression<Object>> expressions) → void
Adds a RETURNING clause returning the given expressions which are evaluated against each row affected by this statement.
inherited
setValues(Insertable<Row> entity) → void
Sets the SET components used for this update statement to the columns from entity.
toString() → String
A string representation of this object.
inherited
where(Expression<bool> filter(RS tbl)) → UpdateStatement<Row, RS>
Makes this statement only include rows that match the filter.
inherited
write(Insertable<Row> entity) → Future<int>
Writes all non-null fields from entity into the columns of all rows that match the where clause. Warning: That also means that, when you're not setting a where clause explicitly, this method will update all rows in the table.
writeExpressions(Map<String, Expression<Object>> expressions) → Future<int>
Updates all columns provided in expressions keys with the corresponding Expression.
writeReturning(Insertable<Row> entity) → Future<List<Row>>
Applies the updates from entity to all rows matching the applied where clause and returns affected rows after the update.
writeReturningOnly(Insertable<Row> entity, List<Expression<Object>> expressions) → Future<List<DriftRow>>
Applies the updates from entity to all rows matching the applied where clause and returns expressions of the affected rows after the update.

Operators

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