Skip to main content

Class: ProjectionSize

Defined in: lang-xquery/src/plan/projection-size.ts:10

Plan operator that computes the sequence length for each group of tuples and appends it as sizeCol, making the XQuery fn:last() context value available downstream.

Extends​

Constructors​

Constructor​

new ProjectionSize(lang, sizeCol, source): ProjectionSize

Defined in: lang-xquery/src/plan/projection-size.ts:11

Parameters​

ParameterTypeDescription
langLowercase<string>-
sizeColASTIdentifierColumn identifier that receives the computed sequence length.
sourcePlanTupleOperatorThe upstream tuple stream whose tuples are grouped and sized.

Returns​

ProjectionSize

Overrides​

PlanTupleOperator.constructor

Properties​

lang​

lang: Lowercase<string>

Defined in: core/dist/plan/visitor.d.ts:36

PlanOperator.lang

Inherited from​

PlanTupleOperator.lang


parent?​

optional parent?: PlanOperator

Defined in: core/dist/plan/visitor.d.ts:38

PlanOperator.parent

Inherited from​

PlanTupleOperator.parent


schema​

schema: ASTIdentifier[]

Defined in: core/dist/plan/visitor.d.ts:32

Ordered list of attribute identifiers produced by this operator.

Inherited from​

PlanTupleOperator.schema


schemaSet​

schemaSet: IdSet

Defined in: core/dist/plan/visitor.d.ts:34

Trie-backed set of the same paths as schema; used for O(k) membership tests.

Inherited from​

PlanTupleOperator.schemaSet


sizeCol​

sizeCol: ASTIdentifier

Defined in: lang-xquery/src/plan/projection-size.ts:14

Column identifier that receives the computed sequence length.


source​

source: PlanTupleOperator

Defined in: lang-xquery/src/plan/projection-size.ts:16

The upstream tuple stream whose tuples are grouped and sized.

Methods​

accept()​

accept<Ret, Arg>(visitors, arg?): Ret

Defined in: lang-xquery/src/plan/projection-size.ts:26

Dispatches to visitors[this.lang].visitProjectionSize.

Type Parameters​

Type Parameter
Ret
Arg

Parameters​

ParameterType
visitorsRecord<string, XQueryPlanVisitor<Ret, Arg>>
arg?Arg

Returns​

Ret

Overrides​

PlanTupleOperator.accept


addToSchema()​

addToSchema(item): void

Defined in: core/dist/plan/visitor.d.ts:46

will preserve object references

Parameters​

ParameterType
itemASTIdentifier | IdSet | ASTIdentifier[]

Returns​

void

Inherited from​

PlanTupleOperator.addToSchema


clearSchema()​

clearSchema(): void

Defined in: core/dist/plan/visitor.d.ts:50

will preserve object references

Returns​

void

Inherited from​

PlanTupleOperator.clearSchema


clone()​

clone(): ProjectionSize

Defined in: lang-xquery/src/plan/projection-size.ts:48

Returns a deep copy with a cloned source.

Returns​

ProjectionSize

Overrides​

PlanTupleOperator.clone


getChildren()​

getChildren(): PlanOperator[]

Defined in: lang-xquery/src/plan/projection-size.ts:44

Returns [this.source].

Returns​

PlanOperator[]

Overrides​

PlanTupleOperator.getChildren


getDependencies()​

getDependencies(): IdSet

Defined in: core/dist/plan/visitor.d.ts:54

PlanOperator.getDependencies

Returns​

IdSet

Inherited from​

PlanTupleOperator.getDependencies


removeFromSchema()​

removeFromSchema(item): boolean

Defined in: core/dist/plan/visitor.d.ts:48

will preserve object references

Parameters​

ParameterType
itemASTIdentifier | IdSet | ASTIdentifier[]

Returns​

boolean

Inherited from​

PlanTupleOperator.removeFromSchema


replaceChild()​

replaceChild(current, replacement): void

Defined in: lang-xquery/src/plan/projection-size.ts:33

Swaps source and recomputes the output schema, preserving sizeCol as the last column.

Parameters​

ParameterType
currentPlanTupleOperator
replacementPlanTupleOperator

Returns​

void

Overrides​

PlanTupleOperator.replaceChild