update method

  1. @override
Future<void> update(
  1. String table,
  2. String id,
  3. Map<String, dynamic> data
)
override

Patches the row with matching id — keys in data are written; keys absent from data are unchanged. Caller must include updated_at in data. Throws StateError if the row does not exist.

Implementation

@override
Future<void> update(String table, String id, Map<String, dynamic> data) async {
  final rows = _tables[table];
  if (rows == null || !rows.containsKey(id)) {
    throw StateError('Row $id not found in $table');
  }
  rows[id]!.addAll(data);
}