applyTransactionUpdate method
void
applyTransactionUpdate(
- BsatnRowList deletes,
- BsatnRowList inserts,
- EventContext context, {
- Set? protectedKeys,
- bool reconcile = false,
Apply transaction update with event context
Updates the cache with inserts/deletes from a transaction and emits changes to streams. The EventContext contains metadata about what caused the transaction (reducer name, caller, status, etc.).
Phase 3 will add enhanced event streams that include the context.
Implementation
void applyTransactionUpdate(
BsatnRowList deletes,
BsatnRowList inserts,
EventContext context, {
Set<dynamic>? protectedKeys,
bool reconcile = false,
}) {
final changes = _applyChanges(
deletes,
inserts,
protectedKeys: protectedKeys,
reconcile: reconcile,
);
_emitChanges(changes, context);
if (isEvent) {
_rowsByPrimaryKey.clear();
_rows.clear();
}
}