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

Function writeSelectRow

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:3602–3630  ·  view source on GitHub ↗
(rootRowId)

Source from the content-addressed store, hash-verified

3600 }
3601 synchronizeTransactions(queryId, rootStore, selectJoinWhereStore);
3602 const writeSelectRow = (rootRowId) => {
3603 const getJoinCell = (arg1, arg2, arg3) => {
3604 const joinedTableId = isTrue(arg1) ? arg2 : arg1;
3605 const joinedCellId = isTrue(arg1) ? arg3 : arg2;
3606 if (isUndefined(joinedCellId)) {
3607 return rootStore.getCell(tableId, rootRowId, arg1);
3608 }
3609 if (joinedTableId === tableId && !isTrue(arg1)) {
3610 return rootStore.getCell(tableId, rootRowId, joinedCellId);
3611 }
3612 const join2 = mapGet(joins, joinedTableId);
3613 return isUndefined(join2) ? void 0 : join2[5].getCell(
3614 join2[0],
3615 mapGet(join2[4], rootRowId)?.[0],
3616 joinedCellId
3617 );
3618 };
3619 selectJoinWhereStore.transaction(
3620 () => arrayEvery(wheres, (where2) => where2(getJoinCell)) ? mapForEach(
3621 selects,
3622 (asCellId, tableCellGetter) => selectJoinWhereStore._[5](
3623 queryId,
3624 rootRowId,
3625 asCellId,
3626 tableCellGetter(getJoinCell, rootRowId)
3627 )
3628 ) : selectJoinWhereStore.delRow(queryId, rootRowId)
3629 );
3630 };
3631 const listenToTable = (rootRowId, sourceStore, tableId2, rowId, toJoinAliases2) => {
3632 const getCell = (cellId) => sourceStore.getCell(tableId2, rowId, cellId);
3633 arrayForEach(toJoinAliases2, (joinAlias) => {

Callers 1

listenToTableFunction · 0.70

Calls 4

arrayEveryFunction · 0.70
mapForEachFunction · 0.70
transactionMethod · 0.65
delRowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…