Class: XQueryVariableMapper
Defined in: lang-xquery/src/visitors/variable-mapper.ts:10
Extends VariableMapper to assign numeric execution slots for the
XQuery focus context columns (., pos, len) produced by
TreeJoin, and to translate the size column of ProjectionSize.
Extends
Implements
Constructors
Constructor
new XQueryVariableMapper(
vmap):XQueryVariableMapper
Defined in: core/dist/visitors/variable-mapper.d.ts:35
Parameters
| Parameter | Type | Description |
|---|---|---|
vmap | Record<string, PlanVisitor<void, VariableMapperCtx>> | Per-language visitor map used for recursive descent. |
Returns
XQueryVariableMapper
Inherited from
Properties
vmap
protectedvmap:Record<string,PlanVisitor<void,VariableMapperCtx>>
Defined in: core/dist/visitors/variable-mapper.d.ts:34
Per-language visitor map used for recursive descent.
Inherited from
Methods
mapVariables()
mapVariables(
plan):VariableMapperCtx
Defined in: core/dist/visitors/variable-mapper.d.ts:43
Traverses plan and returns a fully populated VariableMapperCtx in which every
named identifier has been replaced with a numeric index. The resulting context is
passed to Executor.execute to drive array-based scope lookups.
Parameters
| Parameter | Type |
|---|---|
plan | PlanOperator |
Returns
Inherited from
removeFromCurrScope()
protectedremoveFromCurrScope(attr,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:58
Removes an identifier from the current scope. For example, a projection may drop an attribute, and it should no longer be visible in the current scope. Instead, a previously shadowed variable may now be visible.
Parameters
| Parameter | Type |
|---|---|
attr | ASTIdentifier |
ctx | VariableMapperCtx |
Returns
void
Inherited from
VariableMapper.removeFromCurrScope
setTranslations()
protectedsetTranslations(operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:67
Snapshots the current scope stack into ctx.translations for operator, recording
both the operator's own scope (top of stack) and the merged external view.
Parameters
| Parameter | Type |
|---|---|
operator | PlanOperator |
ctx | VariableMapperCtx |
Returns
void
Inherited from
VariableMapper.setTranslations
translate()
protectedtranslate(attr,ctx,depth?):ASTIdentifier
Defined in: core/dist/visitors/variable-mapper.d.ts:52
Translates an identifier into a numerical index. Sometimes it may be necessary to specify depth as 1 and shadow existing translations. Other times, it may be necessary to first add new scope and THEN set depth to 1 (and force a new translation). For example, when a projection writes new content into an existing variable, this might conflict with, e.g., projection concats upstream that depend on that variable
Parameters
| Parameter | Type |
|---|---|
attr | ASTIdentifier |
ctx | VariableMapperCtx |
depth? | number |
Returns
Inherited from
translateArray()
protectedtranslateArray(array,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:60
Translates each ASTIdentifier in array in place; recurses into operators.
Parameters
| Parameter | Type |
|---|---|
array | OpOrId[] |
ctx | VariableMapperCtx |
Returns
void
Inherited from
union()
protectedunion(a, ...bs):VariableMap
Defined in: core/dist/visitors/variable-mapper.d.ts:62
Returns a new VariableMap containing all entries from a and every map in bs, with later maps winning on collision.
Parameters
| Parameter | Type |
|---|---|
a | VariableMap |
...bs | VariableMap[] |
Returns
Inherited from
visitAggregate()
visitAggregate(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:84
Parameters
| Parameter | Type |
|---|---|
operator | AggregateCall |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitAggregate
Inherited from
visitBidirectionalRecursion()
visitBidirectionalRecursion(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:98
Parameters
| Parameter | Type |
|---|---|
operator | BidirectionalRecursion |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitBidirectionalRecursion
Inherited from
VariableMapper.visitBidirectionalRecursion
visitCalculation()
visitCalculation(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:75
Parameters
| Parameter | Type |
|---|---|
operator | Calculation |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitCalculation
Inherited from
VariableMapper.visitCalculation
visitCartesianProduct()
visitCartesianProduct(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:77
Parameters
| Parameter | Type |
|---|---|
operator | CartesianProduct |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitCartesianProduct
Inherited from
VariableMapper.visitCartesianProduct
visitConditional()
visitConditional(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:76
Parameters
| Parameter | Type |
|---|---|
operator | Conditional |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitConditional
Inherited from
VariableMapper.visitConditional
visitDifference()
visitDifference(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:90
Parameters
| Parameter | Type |
|---|---|
operator | Difference |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitDifference
Inherited from
VariableMapper.visitDifference
visitDistinct()
visitDistinct(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:91
Parameters
| Parameter | Type |
|---|---|
operator | Distinct |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitDistinct
Inherited from
visitFnCall()
visitFnCall(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:73
Parameters
| Parameter | Type |
|---|---|
operator | FnCall |
ctx | VariableMapperCtx |
Returns
void
Implementation of
Inherited from
visitGroupBy()
visitGroupBy(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:85
Parameters
| Parameter | Type |
|---|---|
operator | GroupBy |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitGroupBy
Inherited from
visitIndexedRecursion()
visitIndexedRecursion(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:97
Parameters
| Parameter | Type |
|---|---|
operator | IndexedRecursion |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitIndexedRecursion
Inherited from
VariableMapper.visitIndexedRecursion
visitIndexScan()
visitIndexScan(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:96
Parameters
| Parameter | Type |
|---|---|
operator | IndexScan |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitIndexScan
Inherited from
visitIntersection()
visitIntersection(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:89
Parameters
| Parameter | Type |
|---|---|
operator | Intersection |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitIntersection
Inherited from
VariableMapper.visitIntersection
visitItemFnSource()
visitItemFnSource(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:93
Parameters
| Parameter | Type |
|---|---|
operator | ItemFnSource |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitItemFnSource
Inherited from
VariableMapper.visitItemFnSource
visitItemSource()
visitItemSource(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:72
Parameters
| Parameter | Type |
|---|---|
operator | ItemSource |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitItemSource
Inherited from
VariableMapper.visitItemSource
visitJoin()
visitJoin(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:78
Parameters
| Parameter | Type |
|---|---|
operator | Join |
ctx | VariableMapperCtx |
Returns
void
Implementation of
Inherited from
visitLimit()
visitLimit(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:86
Parameters
| Parameter | Type |
|---|---|
operator | Limit |
ctx | VariableMapperCtx |
Returns
void
Implementation of
Inherited from
visitLiteral()
visitLiteral(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:74
Parameters
| Parameter | Type |
|---|---|
operator | Literal |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitLiteral
Inherited from
visitMapFromItem()
visitMapFromItem(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:81
Parameters
| Parameter | Type |
|---|---|
operator | MapFromItem |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitMapFromItem
Inherited from
VariableMapper.visitMapFromItem
visitMapToItem()
visitMapToItem(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:80
Parameters
| Parameter | Type |
|---|---|
operator | MapToItem |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitMapToItem
Inherited from
visitNullSource()
visitNullSource(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:92
Parameters
| Parameter | Type |
|---|---|
operator | NullSource |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitNullSource
Inherited from
VariableMapper.visitNullSource
visitOrderBy()
visitOrderBy(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:83
Parameters
| Parameter | Type |
|---|---|
operator | OrderBy |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitOrderBy
Inherited from
visitProjection()
visitProjection(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:69
Parameters
| Parameter | Type |
|---|---|
operator | Projection |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitProjection
Inherited from
VariableMapper.visitProjection
visitProjectionConcat()
visitProjectionConcat(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:79
Parameters
| Parameter | Type |
|---|---|
operator | ProjectionConcat |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitProjectionConcat
Inherited from
VariableMapper.visitProjectionConcat
visitProjectionIndex()
visitProjectionIndex(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:82
Parameters
| Parameter | Type |
|---|---|
operator | ProjectionIndex |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitProjectionIndex
Inherited from
VariableMapper.visitProjectionIndex
visitProjectionSize()
visitProjectionSize(
operator,ctx):void
Defined in: lang-xquery/src/visitors/variable-mapper.ts:23
Parameters
| Parameter | Type |
|---|---|
operator | ProjectionSize |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitProjectionSize
visitQuantifier()
visitQuantifier(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:95
Parameters
| Parameter | Type |
|---|---|
operator | Quantifier |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitQuantifier
Inherited from
VariableMapper.visitQuantifier
visitRecursion()
visitRecursion(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:68
Parameters
| Parameter | Type |
|---|---|
operator | Recursion |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitRecursion
Inherited from
visitSelection()
visitSelection(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:70
Parameters
| Parameter | Type |
|---|---|
operator | Selection |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitSelection
Inherited from
visitSetOp()
protectedvisitSetOp(operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:87
Parameters
| Parameter | Type |
|---|---|
operator | SetOperator |
ctx | VariableMapperCtx |
Returns
void
Inherited from
visitTreeJoin()
visitTreeJoin(
operator,ctx):void
Defined in: lang-xquery/src/visitors/variable-mapper.ts:14
Parameters
| Parameter | Type |
|---|---|
operator | TreeJoin |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitTreeJoin
visitTupleFnSource()
visitTupleFnSource(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:94
Parameters
| Parameter | Type |
|---|---|
operator | TupleFnSource |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitTupleFnSource
Inherited from
VariableMapper.visitTupleFnSource
visitTupleSource()
visitTupleSource(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:71
Parameters
| Parameter | Type |
|---|---|
operator | TupleSource |
ctx | VariableMapperCtx |
Returns
void
Implementation of
XQueryPlanVisitor.visitTupleSource
Inherited from
VariableMapper.visitTupleSource
visitUnion()
visitUnion(
operator,ctx):void
Defined in: core/dist/visitors/variable-mapper.d.ts:88
Parameters
| Parameter | Type |
|---|---|
operator | Union |
ctx | VariableMapperCtx |
Returns
void