Skip to main content

Class: Projection

Defined in: packages/core/src/plan/operators/tuple/projection.ts:32

Projects a subset of attributes from its source, optionally renaming them.

renames maps original paths to alias paths; renamesInv is the inverse.

Extends

Constructors

Constructor

new Projection(lang, attrs, source): Projection

Defined in: packages/core/src/plan/operators/tuple/projection.ts:38

Parameters

ParameterTypeDescription
langLowercase<string>-
attrsAliased<Calculation | ASTIdentifier>[]Attributes to emit, each paired with its output alias.
sourcePlanTupleOperatorTuple operator providing the input rows.

Returns

Projection

Overrides

PlanTupleOperator.constructor

Properties

attrs

attrs: Aliased<Calculation | ASTIdentifier>[]

Defined in: packages/core/src/plan/operators/tuple/projection.ts:41

Attributes to emit, each paired with its output alias.


lang

lang: Lowercase<string>

Defined in: packages/core/src/plan/visitor.ts:42

PlanOperator.lang

Inherited from

PlanTupleOperator.lang


parent?

optional parent?: PlanOperator

Defined in: packages/core/src/plan/visitor.ts:44

PlanOperator.parent

Inherited from

PlanTupleOperator.parent


renames

renames: RenameMap

Defined in: packages/core/src/plan/operators/tuple/projection.ts:34

Forward rename map: original attribute path → alias path.


renamesInv

renamesInv: RenameMap

Defined in: packages/core/src/plan/operators/tuple/projection.ts:36

Inverse rename map: alias path → original attribute path.


schema

schema: ASTIdentifier[]

Defined in: packages/core/src/plan/visitor.ts:38

Ordered list of attribute identifiers produced by this operator.

Inherited from

PlanTupleOperator.schema


schemaSet

schemaSet: IdSet

Defined in: packages/core/src/plan/visitor.ts:40

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

Inherited from

PlanTupleOperator.schemaSet


source

source: PlanTupleOperator

Defined in: packages/core/src/plan/operators/tuple/projection.ts:43

Tuple operator providing the input rows.

Methods

accept()

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

Defined in: packages/core/src/plan/operators/tuple/projection.ts:61

PlanOperator.accept

Type Parameters

Type Parameter
Ret
Arg

Parameters

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

Returns

Ret

Overrides

PlanTupleOperator.accept


addToSchema()

addToSchema(item): void

Defined in: packages/core/src/plan/visitor.ts:57

will preserve object references

Parameters

ParameterType
itemIdSet | ASTIdentifier | ASTIdentifier[]

Returns

void

Inherited from

PlanTupleOperator.addToSchema


clearSchema()

clearSchema(): void

Defined in: packages/core/src/plan/visitor.ts:102

will preserve object references

Returns

void

Inherited from

PlanTupleOperator.clearSchema


clone()

clone(): Projection

Defined in: packages/core/src/plan/operators/tuple/projection.ts:91

PlanOperator.clone

Returns

Projection

Overrides

PlanTupleOperator.clone


getChildren()

getChildren(): PlanOperator[]

Defined in: packages/core/src/plan/operators/tuple/projection.ts:84

PlanOperator.getChildren

Returns

PlanOperator[]

Overrides

PlanTupleOperator.getChildren


getDependencies()

getDependencies(): IdSet

Defined in: packages/core/src/plan/operators/tuple/projection.ts:100

PlanOperator.getDependencies

Returns

IdSet

Overrides

PlanTupleOperator.getDependencies


removeFromSchema()

removeFromSchema(item): boolean

Defined in: packages/core/src/plan/visitor.ts:80

will preserve object references

Parameters

ParameterType
itemIdSet | ASTIdentifier | ASTIdentifier[]

Returns

boolean

Inherited from

PlanTupleOperator.removeFromSchema


replaceChild()

replaceChild(current, replacement): void

Defined in: packages/core/src/plan/operators/tuple/projection.ts:68

PlanOperator.replaceChild

Parameters

ParameterType
currentPlanOperator
replacementOpOrId

Returns

void

Overrides

PlanTupleOperator.replaceChild