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

Function collectFromAliases

packages/db/src/query/builder/index.ts:1329–1339  ·  view source on GitHub ↗
(from: QueryIR[`from`])

Source from the content-addressed store, hash-verified

1327}
1328
1329function collectFromAliases(from: QueryIR[`from`]): Array<string> {
1330 if (from.type === `unionFrom`) {
1331 return from.sources.map((source) => source.alias)
1332 }
1333
1334 if (from.type === `unionAll`) {
1335 return from.queries.flatMap((branch) => collectQueryAliases(branch))
1336 }
1337
1338 return [from.alias]
1339}
1340
1341/**
1342 * Checks if two eq() arguments form a parent-child correlation.

Callers 1

collectQueryAliasesFunction · 0.85

Calls 2

collectQueryAliasesFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected