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

Function join

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:3406–3422  ·  view source on GitHub ↗
(arg1, arg2, arg3, arg4)

Source from the content-addressed store, hash-verified

3404 };
3405 };
3406 const join = (arg1, arg2, arg3, arg4) => {
3407 const joinedTableId = isTrue(arg1) ? arg2 : arg1;
3408 const [fromJoinAlias, onArg] = isTrue(arg1) ? isUndefined(arg4) || isFunction(arg3) ? [void 0, arg3] : [arg3, arg4] : isUndefined(arg3) || isFunction(arg2) ? [void 0, arg2] : [arg2, arg3];
3409 const joinEntry = [
3410 joinedTableId,
3411 [
3412 joinedTableId,
3413 fromJoinAlias,
3414 isFunction(onArg) ? onArg : (getCell) => getCell(onArg),
3415 [],
3416 mapNew(),
3417 isTrue(arg1) ? getResultStore(joinedTableId) : store
3418 ]
3419 ];
3420 arrayPush(joinEntries, joinEntry);
3421 return { as: (joinedTableId2) => joinEntry[0] = joinedTableId2 };
3422 };
3423 const where = (arg1, arg2, arg3, arg4) => arrayPush(
3424 wheres,
3425 isFunction(arg1) ? arg1 : isTrue(arg1) ? (getTableCell) => getTableCell(true, arg2, arg3) === arg4 : isUndefined(arg3) ? (getTableCell) => getTableCell(arg1) === arg2 : (getTableCell) => getTableCell(arg1, arg2) === arg3

Callers

nothing calls this directly

Calls 7

isTrueFunction · 0.70
isUndefinedFunction · 0.70
isFunctionFunction · 0.70
getCellFunction · 0.70
mapNewFunction · 0.70
getResultStoreFunction · 0.70
arrayPushFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…