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

Function rootRowChanged

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:3683–3705  ·  view source on GitHub ↗
(sourceStore, _tableId, rootRowId)

Source from the content-addressed store, hash-verified

3681 };
3682 const { 3: toJoinAliases } = mapGet(joins, void 0);
3683 const rootRowChanged = (sourceStore, _tableId, rootRowId) => {
3684 if (rootStore.hasRow(tableId, rootRowId)) {
3685 listenToTable(
3686 rootRowId,
3687 rootStore,
3688 tableId,
3689 rootRowId,
3690 toJoinAliases
3691 );
3692 } else {
3693 selectJoinWhereStore.delRow(queryId, rootRowId);
3694 collForEach(
3695 joins,
3696 ({ 4: idsByRootRowId }) => ifNotUndefined(
3697 mapGet(idsByRootRowId, rootRowId),
3698 ([, sourceStore2, listenerId]) => {
3699 delSourceStoreListeners(queryId, sourceStore2, listenerId);
3700 mapSet(idsByRootRowId, rootRowId);
3701 }
3702 )
3703 );
3704 }
3705 };
3706 selectJoinWhereStore.transaction(() => {
3707 arrayForEach(
3708 rootStore.getRowIds(tableId),

Callers 1

setQueryDefinitionImplFunction · 0.70

Calls 7

listenToTableFunction · 0.70
collForEachFunction · 0.70
mapGetFunction · 0.70
delSourceStoreListenersFunction · 0.70
mapSetFunction · 0.70
hasRowMethod · 0.65
delRowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…