Skip to main content

Class: XQueryAttributeRenameChecker

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

Extends AttributeRenameChecker to handle the XQuery-specific TreeJoin and ProjectionSize plan operators.

Extends​

Implements​

Constructors​

Constructor​

new XQueryAttributeRenameChecker(vmap, db): XQueryAttributeRenameChecker

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

Parameters​

ParameterType
vmapRecord<string, PlanVisitor<boolean, ArcDescentArgs>>
dbDortDBAsFriend

Returns​

XQueryAttributeRenameChecker

Overrides​

AttributeRenameChecker.constructor

Properties​

db​

protected db: DortDBAsFriend

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:22

Database instance providing access to the language manager.

Inherited from​

AttributeRenameChecker.db


tdepsVmap​

protected tdepsVmap: Record<string, TransitiveDependencies>

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:24

Per-language TransitiveDependencies visitor map, used to detect rename conflicts.

Inherited from​

AttributeRenameChecker.tdepsVmap


vmap​

protected vmap: Record<string, PlanVisitor<boolean, ArcDescentArgs>>

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

Per-language visitor map used for recursive descent.

Inherited from​

AttributeRenameChecker.vmap

Methods​

canRename()​

canRename(plan, renamesInv): boolean

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

Returns true if applying args (an inverse rename map) to plan is safe, i.e. no attribute referenced in the subtree would be ambiguously renamed.

Parameters​

ParameterType
planPlanOperator
renamesInvRenameMap

Returns​

boolean

Inherited from​

AttributeRenameChecker.canRename


checkAttrs()​

protected checkAttrs(attrs, verticalCtx, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:51

Verifies that none of the projection attrs has its output identifier in args (unless it is a trivial identity alias), and that all computed attr expressions pass the horizontal rename check.

Parameters​

ParameterType
attrsAliased<ASTIdentifier | Calculation>[]
verticalCtxIdSet
argsArcDescentArgs

Returns​

boolean

Inherited from​

AttributeRenameChecker.checkAttrs


checkHorizontal()​

protected checkHorizontal(horizontal, verticalCtx, args): boolean

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

Checks whether horizontal (an expression computed from the current row) can be safely renamed: its transitive dependencies outside verticalCtx must not overlap with any renamed attribute, and the expression itself must pass the rename check.

Parameters​

ParameterType
horizontalPlanOperator
verticalCtxIdSet
argsArcDescentArgs

Returns​

boolean

Inherited from​

AttributeRenameChecker.checkHorizontal


checkHorizontalArray()​

protected checkHorizontalArray(horizontal, verticalCtx, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:45

Calls checkHorizontal for every non-identifier element of horizontal, returning false as soon as any element fails the rename check.

Parameters​

ParameterType
horizontalOpOrId[]
verticalCtxIdSet
argsArcDescentArgs

Returns​

boolean

Inherited from​

AttributeRenameChecker.checkHorizontalArray


checkVerticalArray()​

protected checkVerticalArray(vertical, args): boolean

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

Calls the rename check for every non-identifier element of vertical (expression arguments), returning false as soon as any element fails.

Parameters​

ParameterType
verticalOpOrId[]
argsArcDescentArgs

Returns​

boolean

Inherited from​

AttributeRenameChecker.checkVerticalArray


visitAggregate()​

visitAggregate(operator, args): boolean

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

Parameters​

ParameterType
operatorAggregateCall
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitAggregate

Inherited from​

AttributeRenameChecker.visitAggregate


visitBidirectionalRecursion()​

visitBidirectionalRecursion(operator, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:87

Parameters​

ParameterType
operatorBidirectionalRecursion
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitBidirectionalRecursion

Inherited from​

AttributeRenameChecker.visitBidirectionalRecursion


visitCalculation()​

visitCalculation(operator, args): boolean

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

Parameters​

ParameterType
operatorCalculation
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitCalculation

Inherited from​

AttributeRenameChecker.visitCalculation


visitCartesianProduct()​

visitCartesianProduct(operator, args): boolean

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

Parameters​

ParameterType
operatorCartesianProduct
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitCartesianProduct

Inherited from​

AttributeRenameChecker.visitCartesianProduct


visitConditional()​

visitConditional(operator, args): boolean

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

Parameters​

ParameterType
operatorConditional
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitConditional

Inherited from​

AttributeRenameChecker.visitConditional


visitDifference()​

visitDifference(operator, args): boolean

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

Parameters​

ParameterType
operatorDifference
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitDifference

Inherited from​

AttributeRenameChecker.visitDifference


visitDistinct()​

visitDistinct(operator, args): boolean

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

Parameters​

ParameterType
operatorDistinct
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitDistinct

Inherited from​

AttributeRenameChecker.visitDistinct


visitFnCall()​

visitFnCall(operator, args): boolean

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

Parameters​

ParameterType
operatorFnCall
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitFnCall

Inherited from​

AttributeRenameChecker.visitFnCall


visitGroupBy()​

visitGroupBy(operator, args): boolean

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

Parameters​

ParameterType
operatorGroupBy
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitGroupBy

Inherited from​

AttributeRenameChecker.visitGroupBy


visitIndexedRecursion()​

visitIndexedRecursion(operator, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:86

Parameters​

ParameterType
operatorIndexedRecursion
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitIndexedRecursion

Inherited from​

AttributeRenameChecker.visitIndexedRecursion


visitIndexScan()​

visitIndexScan(operator, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:85

Parameters​

ParameterType
operatorIndexScan
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitIndexScan

Inherited from​

AttributeRenameChecker.visitIndexScan


visitIntersection()​

visitIntersection(operator, args): boolean

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

Parameters​

ParameterType
operatorIntersection
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitIntersection

Inherited from​

AttributeRenameChecker.visitIntersection


visitItemFnSource()​

visitItemFnSource(operator, args): boolean

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

Parameters​

ParameterType
operatorItemFnSource
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitItemFnSource

Inherited from​

AttributeRenameChecker.visitItemFnSource


visitItemSource()​

visitItemSource(operator, args): boolean

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

Parameters​

ParameterType
operatorItemSource
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitItemSource

Inherited from​

AttributeRenameChecker.visitItemSource


visitJoin()​

visitJoin(operator, args): boolean

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

Parameters​

ParameterType
operatorJoin
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitJoin

Inherited from​

AttributeRenameChecker.visitJoin


visitLimit()​

visitLimit(operator, args): boolean

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

Parameters​

ParameterType
operatorLimit
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitLimit

Inherited from​

AttributeRenameChecker.visitLimit


visitLiteral()​

visitLiteral(operator, args): boolean

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

Parameters​

ParameterType
operatorLiteral
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitLiteral

Inherited from​

AttributeRenameChecker.visitLiteral


visitMapFromItem()​

visitMapFromItem(operator, args): boolean

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

Parameters​

ParameterType
operatorMapFromItem
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitMapFromItem

Inherited from​

AttributeRenameChecker.visitMapFromItem


visitMapToItem()​

visitMapToItem(operator, args): boolean

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

Parameters​

ParameterType
operatorMapToItem
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitMapToItem

Inherited from​

AttributeRenameChecker.visitMapToItem


visitNullSource()​

visitNullSource(operator, args): boolean

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

Parameters​

ParameterType
operatorNullSource
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitNullSource

Inherited from​

AttributeRenameChecker.visitNullSource


visitOrderBy()​

visitOrderBy(operator, args): boolean

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

Parameters​

ParameterType
operatorOrderBy
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitOrderBy

Inherited from​

AttributeRenameChecker.visitOrderBy


visitProjection()​

visitProjection(operator, args): boolean

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

Parameters​

ParameterType
operatorProjection
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitProjection

Inherited from​

AttributeRenameChecker.visitProjection


visitProjectionConcat()​

visitProjectionConcat(operator, args): boolean

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

Parameters​

ParameterType
operatorProjectionConcat
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitProjectionConcat

Inherited from​

AttributeRenameChecker.visitProjectionConcat


visitProjectionIndex()​

visitProjectionIndex(operator, args): boolean

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

Parameters​

ParameterType
operatorProjectionIndex
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitProjectionIndex

Inherited from​

AttributeRenameChecker.visitProjectionIndex


visitProjectionSize()​

visitProjectionSize(operator, args): boolean

Defined in: lang-xquery/src/visitors/attr-rename-checker.ts:30

Parameters​

ParameterType
operatorProjectionSize
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitProjectionSize


visitQuantifier()​

visitQuantifier(operator, args): boolean

Defined in: core/dist/visitors/attribute-rename-checker.d.ts:84

Parameters​

ParameterType
operatorQuantifier
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitQuantifier

Inherited from​

AttributeRenameChecker.visitQuantifier


visitRecursion()​

visitRecursion(operator, args): boolean

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

Parameters​

ParameterType
operatorRecursion
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitRecursion

Inherited from​

AttributeRenameChecker.visitRecursion


visitSelection()​

visitSelection(operator, args): boolean

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

Parameters​

ParameterType
operatorSelection
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitSelection

Inherited from​

AttributeRenameChecker.visitSelection


visitSetOp()​

protected visitSetOp(operator, args): boolean

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

Parameters​

ParameterType
operatorSetOperator
argsArcDescentArgs

Returns​

boolean

Inherited from​

AttributeRenameChecker.visitSetOp


visitTreeJoin()​

visitTreeJoin(operator, args): boolean

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

Parameters​

ParameterType
operatorTreeJoin
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitTreeJoin


visitTupleFnSource()​

visitTupleFnSource(operator, args): boolean

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

Parameters​

ParameterType
operatorTupleFnSource
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitTupleFnSource

Inherited from​

AttributeRenameChecker.visitTupleFnSource


visitTupleSource()​

visitTupleSource(operator, args): boolean

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

Parameters​

ParameterType
operatorTupleSource
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitTupleSource

Inherited from​

AttributeRenameChecker.visitTupleSource


visitUnion()​

visitUnion(operator, args): boolean

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

Parameters​

ParameterType
operatorUnion
argsArcDescentArgs

Returns​

boolean

Implementation of​

XQueryPlanVisitor.visitUnion

Inherited from​

AttributeRenameChecker.visitUnion