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

Function createTransactionWithChanges

core/transaction.ts:262–270  ·  view source on GitHub ↗
(changes: Change[])

Source from the content-addressed store, hash-verified

260export type ClientDBTransaction = ReturnType<typeof createTransaction>;
261
262export function createTransactionWithChanges(changes: Change[]) {
263 const transaction = createTransaction();
264
265 for (const change of changes) {
266 transaction.pushChange(change);
267 }
268
269 return transaction;
270}
271
272let currentTransaction: ClientDBTransaction | null = null;
273

Callers 1

createEntityClientFunction · 0.90

Calls 1

createTransactionFunction · 0.85

Tested by

no test coverage detected