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

Function getTransactionChangesImpl

src/store/index.ts:1429–1458  ·  view source on GitHub ↗
(encoded = false)

Source from the content-addressed store, hash-verified

1427 };
1428
1429 const getTransactionChangesImpl = (encoded = false): Changes => [
1430 mapToObj(
1431 changedCells,
1432 (table, tableId) =>
1433 mapGet(changedTableIds, tableId) === -1
1434 ? undefined
1435 : mapToObj(
1436 table,
1437 (row, rowId) =>
1438 mapGet(mapGet(changedRowIds, tableId), rowId) === -1
1439 ? undefined
1440 : mapToObj(
1441 row,
1442 ([, newCell]) =>
1443 decodeIfJson(newCell, EMPTY_STRING, encoded),
1444 (changedCell) => pairIsEqual(changedCell),
1445 ),
1446 collIsEmpty,
1447 objIsEmpty,
1448 ),
1449 collIsEmpty,
1450 objIsEmpty,
1451 ),
1452 mapToObj(
1453 changedValues,
1454 ([, newValue]) => decodeIfJson(newValue, EMPTY_STRING, encoded),
1455 (changedValue) => pairIsEqual(changedValue),
1456 ),
1457 1,
1458 ];
1459
1460 // --
1461

Callers 2

getTransactionChangesFunction · 0.70

Calls 4

mapToObjFunction · 0.90
mapGetFunction · 0.90
decodeIfJsonFunction · 0.90
pairIsEqualFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…