UpdateStatement<T extends Table, D> class Null safety

Represents an UPDATE statement in sql.

Mixed in types
Available Extensions


UpdateStatement(DatabaseConnectionUser database, TableInfo<T, D> table)
Used internally by drift, construct an update statement


database DatabaseConnectionUser
The database this statement should be sent to.
read / writeinherited
hashCode int
The hash code for this object.
limitExpr Limit?
The LIMIT clause for this statement.
read / writeinherited
orderByExpr OrderBy?
The ORDER BY clause for this statement
read / writeinherited
runtimeType Type
A representation of the runtime type of the object.
table ResultSetImplementation<T, D>
The (main) table or view that this query operates on.
read / writeinherited
whereExpr Where?
The WHERE clause for this statement
read / writeinherited
writeReturningClause bool
Whether a RETURNING * clause should be added to this statement.
read / writeinherited


constructQuery() GenerationContext
Constructs the query that can then be sent to the database executor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
replace(Insertable<D> entity, {bool dontExecute = false}) 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.
toString() String
A string representation of this object.
where(Expression<bool> filter(T tbl)) → void
Makes this statement only include rows that match the filter.
write(Insertable<D> entity, {bool dontExecute = false}) 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.
writeInto(GenerationContext context) → void
Writes this component into the context by writing to its GenerationContext.buffer or by introducing bound variables. When writing into the buffer, no whitespace around the this component should be introduced. When a component consists of multiple composed component, it's responsible for introducing whitespace between its child components.
writeReturning(Insertable<D> entity) Future<List<D>>
Applies the updates from entity to all rows matching the applied where clause and returns affected rows after the update.
writeStartPart(GenerationContext ctx) → void
Subclasses must override this and write the part of the statement that comes before the where and limit expression..


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