Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

IncludesSubquery.md

249 lines4.1 KB

Defined in: packages/db/src/query/ir.ts:287

Extends

  • BaseExpression

Constructors

Constructor

new IncludesSubquery(
   query, 
   correlationField, 
   childCorrelationField, 
   fieldName, 
   runtime, 
   parentFilters?, 
   parentProjection?, 
   materialization?, 
   scalarField?): IncludesSubquery;

Defined in: packages/db/src/query/ir.ts:289

Parameters

query

QueryIR

correlationField

PropRef

childCorrelationField

PropRef

fieldName

string

runtime
createBucketFacades

(...args) => BucketFacadeAdapter = ...

materializeCompilation

(compilation, getRootKey?) => MaterializedRootCompilation

parentFilters?

Where[]

parentProjection?

PropRef<any>[]

materialization?

IncludesMaterialization = ...

scalarField?

string

Returns

IncludesSubquery

Overrides

BaseExpression.constructor

Properties

__returnType

readonly __returnType: any;

Defined in: packages/db/src/query/ir.ts:88

Internal

  • Type brand for TypeScript inference

Inherited from

BaseExpression.__returnType

childCorrelationField

childCorrelationField: PropRef;

Defined in: packages/db/src/query/ir.ts:292


correlationField

correlationField: PropRef;

Defined in: packages/db/src/query/ir.ts:291


fieldName

fieldName: string;

Defined in: packages/db/src/query/ir.ts:293


materialization

materialization: IncludesMaterialization;

Defined in: packages/db/src/query/ir.ts:298


parentFilters?

optional parentFilters: Where[];

Defined in: packages/db/src/query/ir.ts:296


parentProjection?

optional parentProjection: PropRef<any>[];

Defined in: packages/db/src/query/ir.ts:297


query

query: QueryIR;

Defined in: packages/db/src/query/ir.ts:290


runtime

runtime: object;

Defined in: packages/db/src/query/ir.ts:295

createBucketFacades()

createBucketFacades: (...args) => BucketFacadeAdapter;
Parameters
args

...[string, BucketFacadeCompilation[], (count) => void]

Returns

BucketFacadeAdapter

materializeCompilation()

materializeCompilation: (compilation, getRootKey?) => MaterializedRootCompilation;

Compiles inline includes into the same D2 graph as their parent relation. Collection-valued includes become inert bucket references. The public facade adapter resolves those references after the graph reaches quiescence.

Parameters
compilation

CompilationResult

getRootKey?

(row) => unknown

Returns

MaterializedRootCompilation


scalarField?

optional scalarField: string;

Defined in: packages/db/src/query/ir.ts:299


type

type: "includesSubquery";

Defined in: packages/db/src/query/ir.ts:288

Overrides

BaseExpression.type