Skip to main content

Class: Recursion

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:17

Repeatedly applies a traversal step to a starting set of rows until condition becomes false or the hop count reaches max, emitting rows at each depth in [min, max].

Extends

Constructors

Constructor

new Recursion(lang, min, max, condition, source, distinctKeys?): Recursion

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:18

Parameters

ParameterTypeDefault valueDescription
langLowercase<string>undefined-
minnumberundefinedMinimum number of hops to traverse (inclusive).
maxnumberundefinedMaximum number of hops to traverse (inclusive).
conditionCalculationundefinedany referenced attributes of the input tuples will be resolved as [[collected,...], next]
sourcePlanTupleOperatorundefinedTuple operator providing the start rows.
distinctKeys(Calculation | ASTIdentifier)[][]If set, the recursion will only consider distinct combinations of these keys

Returns

Recursion

Overrides

PlanTupleOperator.constructor

Properties

condition

condition: Calculation

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:25

any referenced attributes of the input tuples will be resolved as [[collected,...], next]


distinctKeys

distinctKeys: (Calculation | ASTIdentifier)[] = []

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:29

If set, the recursion will only consider distinct combinations of these keys


lang

lang: Lowercase<string>

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

PlanOperator.lang

Inherited from

PlanTupleOperator.lang


max

max: number

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:23

Maximum number of hops to traverse (inclusive).


min

min: number

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:21

Minimum number of hops to traverse (inclusive).


parent?

optional parent?: PlanOperator

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

PlanOperator.parent

Inherited from

PlanTupleOperator.parent


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/recursion.ts:27

Tuple operator providing the start rows.

Methods

accept()

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

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

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

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:69

PlanOperator.clone

Returns

Recursion

Overrides

PlanTupleOperator.clone


getChildren()

getChildren(): PlanOperator[]

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:65

PlanOperator.getChildren

Returns

PlanOperator[]

Overrides

PlanTupleOperator.getChildren


getDependencies()

getDependencies(): IdSet

Defined in: packages/core/src/plan/operators/tuple/recursion.ts:81

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/recursion.ts:50

PlanOperator.replaceChild

Parameters

ParameterType
currentPlanOperator
replacementPlanOperator

Returns

void

Overrides

PlanTupleOperator.replaceChild