Skip to main content

Class: XQueryAttributeRenamer

Defined in: lang-xquery/src/visitors/attr-renamer.ts:14

Extends AttributeRenamer to apply column renames inside TreeJoin step expressions and to propagate renames through ProjectionSize operators.

Extends

Implements

Constructors

Constructor

new XQueryAttributeRenamer(vmap, db): XQueryAttributeRenamer

Defined in: lang-xquery/src/visitors/attr-renamer.ts:18

Parameters

ParameterType
vmapRecord<string, PlanVisitor<void, Translations>>
dbDortDBAsFriend

Returns

XQueryAttributeRenamer

Overrides

AttributeRenamer.constructor

Properties

db

protected db: DortDBAsFriend

Defined in: core/dist/visitors/attribute-renamer.d.ts:16

Database instance providing access to the language manager.

Inherited from

AttributeRenamer.db


tdepsVmap

protected tdepsVmap: Record<string, TransitiveDependencies>

Defined in: core/dist/visitors/attribute-renamer.d.ts:18

Per-language TransitiveDependencies visitor map, used to invalidate the cache after renaming.

Inherited from

AttributeRenamer.tdepsVmap


varMappers

protected varMappers: Record<string, VariableMapper>

Defined in: core/dist/visitors/attribute-renamer.d.ts:20

Per-language VariableMapper map, used for variable mapping.

Inherited from

AttributeRenamer.varMappers


vmap

protected vmap: Record<string, PlanVisitor<void, Translations>>

Defined in: core/dist/visitors/attribute-renamer.d.ts:14

Per-language visitor map used for recursive descent.

Inherited from

AttributeRenamer.vmap

Methods

prepareTranslations()

protected prepareTranslations(ctx, renames): Translations

Defined in: core/dist/visitors/attribute-renamer.d.ts:38

Prepares variable map for renaming by reversing the translation map from the variable-mapper context.

Parameters

ParameterType
ctxVariableMapperCtx
renamesRenameMap

Returns

Translations

Inherited from

AttributeRenamer.prepareTranslations


prepareVarMapCtx()

protected prepareVarMapCtx(renames): VariableMapperCtx

Defined in: core/dist/visitors/attribute-renamer.d.ts:34

First, the whole plan is mapped to numeric indexes. This method prepares the context for that mapping.

Parameters

ParameterType
renamesRenameMap

Returns

VariableMapperCtx

Inherited from

AttributeRenamer.prepareVarMapCtx


processArray()

protected processArray(array, translations, containingOp, updateFn?): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:47

Iterates array in place, replacing each ASTIdentifier element with its renamed version.

Parameters

ParameterTypeDescription
arrayOpOrId[]-
translationsTranslations-
containingOpPlanOperator-
updateFn?(newId, i) => voidOptional callback used instead of direct array assignment when the renamed identifier lives in a wrapper object (e.g. a projection pair).

Returns

void

Inherited from

AttributeRenamer.processArray


processItem()

protected processItem<Key, Obj>(obj, key, translations, containingOp): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:52

Renames a single property obj[key] in place when it is an ASTIdentifier; otherwise recurses into the operator.

Type Parameters

Type Parameter
Key extends string
Obj extends Record<Key, OpOrId>

Parameters

ParameterType
objObj
keyKey
translationsTranslations
containingOpPlanOperator

Returns

void

Inherited from

AttributeRenamer.processItem


rename()

rename(plan, renames): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:30

Applies translations to plan in place and invalidates the transitive-dependency cache for the entire subtree rooted at plan.

Parameters

ParameterType
planPlanOperator
renamesRenameMap

Returns

void

Inherited from

AttributeRenamer.rename


renameIdentifier()

protected renameIdentifier(id, varmap): ASTIdentifier

Defined in: core/dist/visitors/attribute-renamer.d.ts:40

Rename a single identifier, keeping references to aggregates

Parameters

ParameterType
idASTIdentifier
varmapVariableMap

Returns

ASTIdentifier

Inherited from

AttributeRenamer.renameIdentifier


visitAggregate()

visitAggregate(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:77

Parameters

ParameterType
operatorAggregateCall
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitAggregate

Inherited from

AttributeRenamer.visitAggregate


visitBidirectionalRecursion()

visitBidirectionalRecursion(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:83

Parameters

ParameterType
operatorBidirectionalRecursion
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitBidirectionalRecursion

Inherited from

AttributeRenamer.visitBidirectionalRecursion


visitCalculation()

visitCalculation(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:60

Parameters

ParameterType
operatorCalculation
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitCalculation

Inherited from

AttributeRenamer.visitCalculation


visitCartesianProduct()

visitCartesianProduct(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:62

Parameters

ParameterType
operatorCartesianProduct
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitCartesianProduct

Inherited from

AttributeRenamer.visitCartesianProduct


visitConditional()

visitConditional(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:61

Parameters

ParameterType
operatorConditional
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitConditional

Inherited from

AttributeRenamer.visitConditional


visitDifference()

visitDifference(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:74

Parameters

ParameterType
operatorDifference
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitDifference

Inherited from

AttributeRenamer.visitDifference


visitDistinct()

visitDistinct(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:75

Parameters

ParameterType
operatorDistinct
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitDistinct

Inherited from

AttributeRenamer.visitDistinct


visitFnCall()

visitFnCall(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:58

Parameters

ParameterType
operatorFnCall
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitFnCall

Inherited from

AttributeRenamer.visitFnCall


visitGroupBy()

visitGroupBy(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:69

Parameters

ParameterType
operatorGroupBy
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitGroupBy

Inherited from

AttributeRenamer.visitGroupBy


visitIndexedRecursion()

visitIndexedRecursion(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:82

Parameters

ParameterType
operatorIndexedRecursion
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitIndexedRecursion

Inherited from

AttributeRenamer.visitIndexedRecursion


visitIndexScan()

visitIndexScan(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:81

Parameters

ParameterType
operatorIndexScan
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitIndexScan

Inherited from

AttributeRenamer.visitIndexScan


visitIntersection()

visitIntersection(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:73

Parameters

ParameterType
operatorIntersection
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitIntersection

Inherited from

AttributeRenamer.visitIntersection


visitItemFnSource()

visitItemFnSource(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:78

Parameters

ParameterType
operatorItemFnSource
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitItemFnSource

Inherited from

AttributeRenamer.visitItemFnSource


visitItemSource()

visitItemSource(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:57

Parameters

ParameterType
operatorItemSource
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitItemSource

Inherited from

AttributeRenamer.visitItemSource


visitJoin()

visitJoin(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:63

Parameters

ParameterType
operatorJoin
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitJoin

Inherited from

AttributeRenamer.visitJoin


visitLimit()

visitLimit(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:70

Parameters

ParameterType
operatorLimit
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitLimit

Inherited from

AttributeRenamer.visitLimit


visitLiteral()

visitLiteral(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:59

Parameters

ParameterType
operatorLiteral
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitLiteral

Inherited from

AttributeRenamer.visitLiteral


visitMapFromItem()

visitMapFromItem(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:66

Parameters

ParameterType
operatorMapFromItem
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitMapFromItem

Inherited from

AttributeRenamer.visitMapFromItem


visitMapToItem()

visitMapToItem(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:65

Parameters

ParameterType
operatorMapToItem
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitMapToItem

Inherited from

AttributeRenamer.visitMapToItem


visitNullSource()

visitNullSource(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:76

Parameters

ParameterType
operatorNullSource
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitNullSource

Inherited from

AttributeRenamer.visitNullSource


visitOrderBy()

visitOrderBy(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:68

Parameters

ParameterType
operatorOrderBy
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitOrderBy

Inherited from

AttributeRenamer.visitOrderBy


visitProjection()

visitProjection(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:54

Parameters

ParameterType
operatorProjection
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitProjection

Inherited from

AttributeRenamer.visitProjection


visitProjectionConcat()

visitProjectionConcat(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:64

Parameters

ParameterType
operatorProjectionConcat
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitProjectionConcat

Inherited from

AttributeRenamer.visitProjectionConcat


visitProjectionIndex()

visitProjectionIndex(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:67

Parameters

ParameterType
operatorProjectionIndex
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitProjectionIndex

Inherited from

AttributeRenamer.visitProjectionIndex


visitProjectionSize()

visitProjectionSize(operator, translations): void

Defined in: lang-xquery/src/visitors/attr-renamer.ts:28

Parameters

ParameterType
operatorProjectionSize
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitProjectionSize


visitQuantifier()

visitQuantifier(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:80

Parameters

ParameterType
operatorQuantifier
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitQuantifier

Inherited from

AttributeRenamer.visitQuantifier


visitRecursion()

visitRecursion(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:53

Parameters

ParameterType
operatorRecursion
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitRecursion

Inherited from

AttributeRenamer.visitRecursion


visitSelection()

visitSelection(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:55

Parameters

ParameterType
operatorSelection
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitSelection

Inherited from

AttributeRenamer.visitSelection


visitSetOp()

visitSetOp(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:71

Parameters

ParameterType
operatorSetOperator
translationsTranslations

Returns

void

Inherited from

AttributeRenamer.visitSetOp


visitTreeJoin()

visitTreeJoin(operator, translations): void

Defined in: lang-xquery/src/visitors/attr-renamer.ts:24

Parameters

ParameterType
operatorTreeJoin
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitTreeJoin


visitTupleFnSource()

visitTupleFnSource(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:79

Parameters

ParameterType
operatorTupleFnSource
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitTupleFnSource

Inherited from

AttributeRenamer.visitTupleFnSource


visitTupleSource()

visitTupleSource(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:56

Parameters

ParameterType
operatorTupleSource
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitTupleSource

Inherited from

AttributeRenamer.visitTupleSource


visitUnion()

visitUnion(operator, translations): void

Defined in: core/dist/visitors/attribute-renamer.d.ts:72

Parameters

ParameterType
operatorUnion
translationsTranslations

Returns

void

Implementation of

XQueryPlanVisitor.visitUnion

Inherited from

AttributeRenamer.visitUnion