delete method
Convenience method for deleting rows in the database.
Delete from table
where
is the optional WHERE clause to apply when updating. Passing null
will delete all rows.
You may include ?s in the where clause, which will be replaced by the
values from whereArgs
Returns the number of rows affected.
int count = await db.delete(tableTodo, where: 'columnId = ?', whereArgs: [id]);
Implementation
@override
Future<int> delete(
String table, {
String? where,
List<Object?>? whereArgs,
}) async {
final rows = await _delegate.delete(
table,
where: where,
whereArgs: whereArgs,
);
if (rows > 0) {
sendTableTrigger({table});
}
return rows;
}