updateById method

  1. @override
Future<bool> updateById(
  1. String table,
  2. Object id,
  3. Map<String, Object?> values
)
override

Atualiza por id; retorna se afetou algo.

Implementation

@override
Future<bool> updateById(
  String table,
  Object id,
  Map<String, Object?> values,
) async {
  for (final r in _t(table)) {
    if ('${r['id']}' == '$id') {
      r.addAll(values);
      return true;
    }
  }
  return false;
}