applyDirect method

Future<DVRemoteOutcome> applyDirect(
  1. Map<String, Object?> values, {
  2. required DateTime at,
})

A write made on the server itself, at at by the declared clock.

Implementation

Future<DVRemoteOutcome> applyDirect(Map<String, Object?> values,
    {required DateTime at}) async {
  final Object key = values[table.key]!;
  final DVRecord? current = await table.read(key, withDeleted: true);
  final DVWriteResult result = await table.write(values,
      base: current, onConflict: DVConflict.lastWriteWins, actor: actor);
  await _setClock(key, at);
  return DVRemoteOutcome.applied(result.record);
}