Skip to main content

Class: TableAlias

Defined in: lang-sql/src/plan/table-alias.ts:14

Plan operator that renames all attributes of a table or function source under a single alias, making them addressable as alias.column.

Remarks​

Replaced in-place by a Projection during schema inference (see SchemaInferrer.visitTableAlias).

Extends​

Constructors​

Constructor​

new TableAlias(lang, alias, source): TableAlias

Defined in: lang-sql/src/plan/table-alias.ts:15

Parameters​

ParameterTypeDescription
langLowercase<string>-
aliasASTIdentifierThe identifier used as the new relation name for all output attributes.
sourceLangSwitch | TupleSource | TupleFnSourceThe underlying tuple source being aliased.

Returns​

TableAlias

Overrides​

PlanTupleOperator.constructor

Properties​

alias​

alias: ASTIdentifier

Defined in: lang-sql/src/plan/table-alias.ts:18

The identifier used as the new relation name for all output attributes.


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


source​

source: LangSwitch | TupleSource | TupleFnSource

Defined in: lang-sql/src/plan/table-alias.ts:20

The underlying tuple source being aliased.

Methods​

accept()​

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

Defined in: lang-sql/src/plan/table-alias.ts:29

Dispatches this operator to the SQL plan visitor.

Type Parameters​

Type Parameter
Ret
Arg

Parameters​

ParameterType
visitorsRecord<string, SQLPlanVisitor<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 | ASTIdentifier[] | IdSet

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(): TableAlias

Defined in: lang-sql/src/plan/table-alias.ts:48

Returns a deep copy with a cloned source and copied schema.

Returns​

TableAlias

Overrides​

PlanTupleOperator.clone


getChildren()​

getChildren(): PlanOperator[]

Defined in: lang-sql/src/plan/table-alias.ts:44

Returns [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 | ASTIdentifier[] | IdSet

Returns​

boolean

Inherited from​

PlanTupleOperator.removeFromSchema


replaceChild()​

replaceChild(current, replacement): void

Defined in: lang-sql/src/plan/table-alias.ts:36

Replaces the current source with replacement.

Parameters​

ParameterType
currentPlanTupleOperator
replacementPlanTupleOperator

Returns​

void

Overrides​

PlanTupleOperator.replaceChild