update method
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);
}