MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getMergeableRowHashes

Function getMergeableRowHashes

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:2806–2819  ·  view source on GitHub ↗
(otherTableHashes)

Source from the content-addressed store, hash-verified

2804 return [newTables, differingTableHashes];
2805 };
2806 const getMergeableRowHashes = (otherTableHashes) => {
2807 const rowHashes = {};
2808 objForEach(
2809 otherTableHashes,
2810 (otherTableHash, tableId) => ifNotUndefined(
2811 mapGet(contentStampMap[0][0], tableId),
2812 ([rowStampMaps, , tableHash]) => tableHash != otherTableHash ? mapForEach(
2813 rowStampMaps,
2814 (rowId, [, , rowHash]) => objEnsure(rowHashes, tableId, objNew)[rowId] = rowHash
2815 ) : 0
2816 )
2817 );
2818 return rowHashes;
2819 };
2820 const getMergeableRowDiff = (otherTableRowHashes) => {
2821 const newRows = stampNewObj(contentStampMap[0][1]);
2822 const differingRowHashes = {};

Callers

nothing calls this directly

Calls 4

objForEachFunction · 0.70
mapGetFunction · 0.70
mapForEachFunction · 0.70
objEnsureFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…