Skip to main content

Interface: PatternRule<T, U>

Defined in: packages/core/src/optimizer/rule.ts:30

Rule for the Optimizer.

Type Parameters

Type ParameterDefault type
T extends PlanOperatorPlanOperator
Uany

Properties

operator

operator: ((...args) => T) | (...args) => T[]

Defined in: packages/core/src/optimizer/rule.ts:34

The operator this rule starts matching at.

Methods

match()

match(node): PatternRuleMatchResult<U>

Defined in: packages/core/src/optimizer/rule.ts:39

Matches the given plan operator against this rule.

Parameters

ParameterTypeDescription
nodeTThe plan operator to match.

Returns

PatternRuleMatchResult<U>


transform()

transform(node, bindings): PlanOperator

Defined in: packages/core/src/optimizer/rule.ts:45

Transforms the given plan operator using the provided bindings.

Parameters

ParameterTypeDescription
nodeTThe plan operator to transform.
bindingsUThe bindings to use for the transformation.

Returns

PlanOperator