UpdateStatement<Row extends Object, RS extends GeneratedTable<Row, RS> > class
final
Represents an UPDATE statement in sql.
- Inheritance
-
- Object
- SqlStatement
- StatementWithReturningClause<
Row, RS> - UpdateStatement
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
RETURNINGclause 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
thisasSelf. -
compileWith(
StatementCompiler compiler) → void -
Compiles this component with the given StatementCompiler by invoking the
relevant
addmethod on it.override -
from(
ResultSet< Object, ResultSet< resultSet) → voidObject, dynamic> > -
Adds a
TableorSubqueryto 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
entitythat is stored in the database with the fields of theentityprovided here. This implicitly applies awhereclause to rows with the same primary key asentity, 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< expressions) → voidObject> > -
Adds a
RETURNINGclause returning the givenexpressionswhich are evaluated against each row affected by this statement.inherited -
setValues(
Insertable< Row> entity) → void -
Sets the
SETcomponents used for this update statement to the columns fromentity. -
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
entityinto the columns of all rows that match thewhereclause. 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< expressions) → Future<Object> >int> -
Updates all columns provided in
expressionskeys with the corresponding Expression. -
writeReturning(
Insertable< Row> entity) → Future<List< Row> > -
Applies the updates from
entityto all rows matching the appliedwhereclause and returns affected rows after the update. -
writeReturningOnly(
Insertable< Row> entity, List<Expression< expressions) → Future<Object> >List< DriftRow> > -
Applies the updates from
entityto all rows matching the appliedwhereclause and returnsexpressionsof the affected rows after the update.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited