update method

Future<RType> update(
  1. KType id,
  2. UType update
)

Implementation

Future<RType> update(KType id, UType update) async {
  tryUpdateRecord(id, (input) async {
    if (input == null) return null;
    return applyUpdate(input, update);
  });

  final saved = await internalUpdate(id, update);
  updateRecord(id, (record) => SynchronousFuture(saved));
  return saved;
}