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

Function isQueryCategory

packages/query-db-collection/tests/query.test.ts:6314–6322  ·  view source on GitHub ↗
(category: string, where: any)

Source from the content-addressed store, hash-verified

6312 let resolveHistoryQueryFn!: (value: Array<CategorisedItem>) => void
6313
6314 const isQueryCategory = (category: string, where: any): boolean => {
6315 return (
6316 where &&
6317 where.type === `func` &&
6318 where.name === `eq` &&
6319 where.args[0]?.path?.[0] === `category` &&
6320 where.args[1]?.value === category
6321 )
6322 }
6323
6324 const queryFn = vi.fn().mockImplementation((ctx: any) => {
6325 const where = ctx.meta?.loadSubsetOptions?.where

Callers 1

query.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected