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

Function getJoinCell

src/queries/index.ts:698–715  ·  view source on GitHub ↗
(arg1: Id | true, arg2?: Id, arg3?: Id)

Source from the content-addressed store, hash-verified

696
697 const writeSelectRow = (rootRowId: Id) => {
698 const getJoinCell = (arg1: Id | true, arg2?: Id, arg3?: Id) => {
699 const joinedTableId = isTrue(arg1) ? arg2 : arg1;
700 const joinedCellId = isTrue(arg1) ? arg3 : arg2;
701 if (isUndefined(joinedCellId)) {
702 return rootStore.getCell(tableId, rootRowId, arg1 as Id);
703 }
704 if (joinedTableId === tableId && !isTrue(arg1)) {
705 return rootStore.getCell(tableId, rootRowId, joinedCellId);
706 }
707 const join = mapGet(joins, joinedTableId as Id) as JoinClause;
708 return isUndefined(join)
709 ? undefined
710 : join[5].getCell(
711 join[0],
712 mapGet(join[4], rootRowId)?.[0] as Id,
713 joinedCellId,
714 );
715 };
716 selectJoinWhereStore.transaction(() =>
717 arrayEvery(wheres, (where) => where(getJoinCell))
718 ? mapForEach(selects, (asCellId, tableCellGetter) =>

Callers

nothing calls this directly

Calls 4

isTrueFunction · 0.90
isUndefinedFunction · 0.90
mapGetFunction · 0.90
getCellMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…