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

Function visitSelectObject

packages/db/src/query/compiler/index.ts:1573–1585  ·  view source on GitHub ↗
(
    obj: Record<string, any>,
    prefix: Array<string>,
    guards: Array<ConditionalSelectGuard>,
  )

Source from the content-addressed store, hash-verified

1571 const resultPaths: Array<ProjectedSourceIncludePath> = []
1572
1573 const visitSelectObject = (
1574 obj: Record<string, any>,
1575 prefix: Array<string>,
1576 guards: Array<ConditionalSelectGuard>,
1577 ) => {
1578 for (const [key, value] of Object.entries(obj)) {
1579 if (key.startsWith(`__SPREAD_SENTINEL__`)) {
1580 visitSpreadSentinel(key, value, prefix, guards)
1581 continue
1582 }
1583 visitSelectValue(value, [...prefix, key], guards)
1584 }
1585 }
1586
1587 const visitSpreadSentinel = (
1588 key: string,

Callers 2

visitSelectValueFunction · 0.85

Calls 3

visitSpreadSentinelFunction · 0.85
visitSelectValueFunction · 0.85
entriesMethod · 0.45

Tested by

no test coverage detected