update<Row extends Object, RS extends GeneratedTable<Row, RS> > method
BatchedStatement
update<Row extends Object, RS extends GeneratedTable<Row, RS> >(
- GeneratedTable<
Row, RS> table, - Insertable<
Row> row, { - Expression<
bool> where(- RS table
Writes all present columns from the row into all rows in the table
that match the where clause.
For more details on how updates work in drift, check out UpdateStatement.write or the documentation with examples
Implementation
BatchedStatement
update<Row extends Object, RS extends GeneratedTable<Row, RS>>(
GeneratedTable<Row, RS> table,
Insertable<Row> row, {
Expression<bool> Function(RS table)? where,
}) {
final stmt = UpdateStatement(database, table)..setValues(row);
if (where != null) stmt.where(where);
return addStatement(stmt);
}