MCPcopy Index your code
hub / github.com/tinyplex/tinybase / transaction

Function transaction

src/persisters/common/database/commands.ts:360–368  ·  view source on GitHub ↗
(
    actions: () => Promise<Return>,
  )

Source from the content-addressed store, hash-verified

358 };
359
360 const transaction = async <Return>(
361 actions: () => Promise<Return>,
362 ): Promise<Return> => {
363 let result;
364 await databaseExecuteCommand('BEGIN');
365 await tryCatch(async () => (result = await actions()), onIgnoredError);
366 await databaseExecuteCommand('END');
367 return result as Return;
368 };
369
370 return [refreshSchema, loadTable, saveTable, transaction];
371};

Callers 4

getPersistedFunction · 0.70
setPersistedFunction · 0.70
getPersistedFunction · 0.70
setPersistedFunction · 0.70

Calls 2

tryCatchFunction · 0.90
actionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…