update abstract method
Convenience method for updating rows in the database. Returns the number of changes made
Update table
with values
, a map from column names to new column
values. null is a valid value that will be translated to NULL.
where
is the optional WHERE clause to apply when updating.
Passing null will update all rows.
You may include ?s in the where clause, which will be replaced by the
values from whereArgs
conflictAlgorithm
(optional) specifies algorithm to use in case of a
conflict. See ConflictAlgorithm docs for more details
int count = await db.update(tableTodo, todo.toMap(),
where: '$columnId = ?', whereArgs: [todo.id]);
Implementation
Future<int> update(String table, Map<String, Object?> values,
{String? where,
List<Object?>? whereArgs,
ConflictAlgorithm? conflictAlgorithm});