MCPcopy Create free account
hub / github.com/TanStack/db / matchesConditionalSelectGuards

Function matchesConditionalSelectGuards

packages/db/src/query/compiler/index.ts:2049–2059  ·  view source on GitHub ↗
(
  guards: Array<{
    condition: (row: any) => any
    expected: boolean
  }>,
  row: any,
)

Source from the content-addressed store, hash-verified

2047}
2048
2049function matchesConditionalSelectGuards(
2050 guards: Array<{
2051 condition: (row: any) => any
2052 expected: boolean
2053 }>,
2054 row: any,
2055): boolean {
2056 return guards.every(
2057 (guard) => isCaseWhenConditionTrue(guard.condition(row)) === guard.expected,
2058 )
2059}
2060
2061export type CompileQueryFn = typeof compileQuery

Callers 1

compileQueryFunction · 0.85

Calls 1

isCaseWhenConditionTrueFunction · 0.85

Tested by

no test coverage detected