MCPcopy Create free account
hub / github.com/clientdb/clientdb / rebaseEntityChanges

Function rebaseEntityChanges

core/transaction.ts:186–194  ·  view source on GitHub ↗

* Will get all pending transactions for given entity and re-apply them

(entity: AnyEntity)

Source from the content-addressed store, hash-verified

184 * Will get all pending transactions for given entity and re-apply them
185 */
186function rebaseEntityChanges(entity: AnyEntity) {
187 const changes = getEntityChanges(entity);
188
189 if (!changes) return;
190
191 for (const change of changes) {
192 reapplyEntityChange(change);
193 }
194}
195
196export function createTransaction() {
197 const changes: Change[] = [];

Callers 2

rejectFunction · 0.85
undoFunction · 0.85

Calls 2

getEntityChangesFunction · 0.85
reapplyEntityChangeFunction · 0.85

Tested by

no test coverage detected