updateMap method
Update a new record using a map and a where condition.
This returns the number of rows affected.
Implementation
Future<int?> updateMap(
TableName table, Map<String, dynamic> values, String where) async {
List<dynamic> args = [];
var keysVal;
values.forEach((key, value) {
if (keysVal == null) {
keysVal = "$key=?";
} else {
keysVal += ",$key=?";
}
args.add(value);
});
var sql = "update ${table.fixedName} set $keysVal where $where;";
return await execute(sql, arguments: args);
}