MCPcopy
hub / github.com/tinyplex/tinybase / where

Function where

src/queries/index.ts:450–466  ·  view source on GitHub ↗
(
            arg1: true | Id | ((getTableCell: GetTableCell) => boolean),
            arg2?: Id | Cell,
            arg3?: Id | Cell,
            arg4?: Cell,
          )

Source from the content-addressed store, hash-verified

448 };
449
450 const where = (
451 arg1: true | Id | ((getTableCell: GetTableCell) => boolean),
452 arg2?: Id | Cell,
453 arg3?: Id | Cell,
454 arg4?: Cell,
455 ) =>
456 arrayPush(
457 wheres,
458 isFunction(arg1)
459 ? arg1
460 : isTrue(arg1)
461 ? (getTableCell) =>
462 getTableCell(true, arg2 as Id, arg3 as Id) === arg4
463 : isUndefined(arg3)
464 ? (getTableCell) => getTableCell(arg1) === arg2
465 : (getTableCell) => getTableCell(arg1, arg2 as Id) === arg3,
466 );
467
468 const group = (
469 selectedCellId: Id,

Callers 10

writeSelectRowFunction · 0.70
hooks.test.tsxFile · 0.50
queries.tsFile · 0.50
testStateFunctionsFunction · 0.50
testStoreReadFunctionsFunction · 0.50
primitives.test.tsFile · 0.50
queries.test.tsFile · 0.50
queries.test.tsFile · 0.50

Calls 4

arrayPushFunction · 0.90
isFunctionFunction · 0.90
isTrueFunction · 0.90
isUndefinedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…