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

Method constructor

packages/db/src/query/ir.ts:178–189  ·  view source on GitHub ↗
(
    public query: QueryIR, // Child query (correlation WHERE removed)
    public correlationField: PropRef, // Parent-side ref (e.g., project.id)
    public childCorrelationField: PropRef, // Child-side ref (e.g., issue.projectId)
    public fieldName: string, // Result field name (e.g., "issues")
    public parentFilters?: Array<Where>, // WHERE clauses referencing parent aliases (applied post-join)
    public parentProjection?: Array<PropRef>, // Parent field refs used by parentFilters
    public materialization: IncludesMaterialization = `collection`,
    public scalarField?: string,
  )

Source from the content-addressed store, hash-verified

176export class IncludesSubquery extends BaseExpression {
177 public type = `includesSubquery` as const
178 constructor(
179 public query: QueryIR, // Child query (correlation WHERE removed)
180 public correlationField: PropRef, // Parent-side ref (e.g., project.id)
181 public childCorrelationField: PropRef, // Child-side ref (e.g., issue.projectId)
182 public fieldName: string, // Result field name (e.g., "issues")
183 public parentFilters?: Array<Where>, // WHERE clauses referencing parent aliases (applied post-join)
184 public parentProjection?: Array<PropRef>, // Parent field refs used by parentFilters
185 public materialization: IncludesMaterialization = `collection`,
186 public scalarField?: string,
187 ) {
188 super()
189 }
190}
191
192export type ConditionalSelectBranch = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected