Skip to main content

Class: TupleFnSource

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:53

A leaf operator that produces tuple rows by invoking a generator function.

Extends

Constructors

Constructor

new TupleFnSource(lang, args, impl, name?): TupleFnSource

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:54

Parameters

ParameterTypeDescription
langLowercase<string>-
args(Calculation | ASTIdentifier)[]Arguments passed to impl; identifiers are resolved at runtime.
impl(...args) => Iterable<unknown>Generator function that yields rows when called with the evaluated arguments.
name?ASTIdentifierOptional name for this source, used for schema resolution.

Returns

TupleFnSource

Overrides

PlanTupleOperator.constructor

Properties

args

args: (Calculation | ASTIdentifier)[]

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:57

Arguments passed to impl; identifiers are resolved at runtime.


impl

impl: (...args) => Iterable<unknown>

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:59

Generator function that yields rows when called with the evaluated arguments.

Parameters

ParameterType
...argsany[]

Returns

Iterable<unknown>


lang

lang: Lowercase<string>

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

PlanOperator.lang

Inherited from

PlanTupleOperator.lang


name?

optional name?: ASTIdentifier

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

Optional name for this source, used for schema resolution.


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

Methods

accept()

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

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:71

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

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:88

PlanOperator.clone

Returns

TupleFnSource

Overrides

PlanTupleOperator.clone


getChildren()

getChildren(): PlanOperator[]

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

PlanOperator.getChildren

Returns

PlanOperator[]

Overrides

PlanTupleOperator.getChildren


getDependencies()

getDependencies(): IdSet

Defined in: packages/core/src/plan/operators/tuple/tuple-source.ts:101

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/tuple-source.ts:78

PlanOperator.replaceChild

Parameters

ParameterType
currentPlanOperator
replacementPlanOperator

Returns

void

Overrides

PlanTupleOperator.replaceChild