applyTransactionUpdateAndCollectKeys method
Set
applyTransactionUpdateAndCollectKeys(
- BsatnRowList deletes,
- BsatnRowList inserts,
- EventContext context, {
- Set? protectedKeys,
- bool reconcile = false,
Apply transaction update and return the set of touched primary keys
Used for touch-based optimistic confirmation. Returns all primary keys that were inserted, updated, or deleted in this transaction.
Implementation
Set<dynamic> applyTransactionUpdateAndCollectKeys(
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();
}
return changes.touchedKeys;
}