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

Function getRefFromAlias

packages/db/src/query/compiler/index.ts:1511–1526  ·  view source on GitHub ↗
(
  query: QueryIR,
  alias: string,
)

Source from the content-addressed store, hash-verified

1509}
1510
1511function getRefFromAlias(
1512 query: QueryIR,
1513 alias: string,
1514): CollectionRef | QueryRef | void {
1515 for (const source of getFromSources(query.from)) {
1516 if (source.alias === alias) {
1517 return source
1518 }
1519 }
1520
1521 for (const join of query.join || []) {
1522 if (join.from.alias === alias) {
1523 return join.from
1524 }
1525 }
1526}
1527
1528function getFromSources(
1529 from: QueryIR[`from`],

Callers 1

followRefFunction · 0.70

Calls 1

getFromSourcesFunction · 0.70

Tested by

no test coverage detected