Class: ExecutionContext
Defined in: packages/core/src/execution-context.ts:6
Holds the runtime variable bindings and translation tables for a single query execution.
Constructors
Constructor
new ExecutionContext():
ExecutionContext
Returns
ExecutionContext
Properties
translations
translations:
Map<PlanOperator, {external:VariableMap;scope:VariableMap; }>
Defined in: packages/core/src/execution-context.ts:12
Per-operator variable translation maps used to locate values in variableValues.
variableNames
variableNames:
ASTIdentifier[] =[]
Defined in: packages/core/src/execution-context.ts:10
same structure as variableNames
variableValues
variableValues:
unknown[] =[]
Defined in: packages/core/src/execution-context.ts:8
Flat array of runtime values indexed by the numeric part of each variable's ASTIdentifier.
Methods
get()
get(
variable):unknown
Defined in: packages/core/src/execution-context.ts:26
Returns the current value of a variable.
Parameters
| Parameter | Type | Description |
|---|---|---|
variable | ASTIdentifier | ASTIdentifier with a single numeric part used as the array index. |
Returns
unknown
getKeys()
getKeys(
operator):number[]
Defined in: packages/core/src/execution-context.ts:51
Get numeric keys for the schema of operator
Parameters
| Parameter | Type |
|---|---|
operator | PlanTupleOperator |
Returns
number[]
getRenames()
getRenames(
sourceOp,targetOp):number[]
Defined in: packages/core/src/execution-context.ts:72
Compute addresses of sourceOp keys in targetOp scope.
Parameters
| Parameter | Type |
|---|---|
sourceOp | PlanTupleOperator |
targetOp | PlanTupleOperator |
Returns
number[]
getTranslation()
getTranslation(
operator,key):number
Defined in: packages/core/src/execution-context.ts:61
Returns the numeric index in variableValues for key within operator's translation.
Parameters
| Parameter | Type |
|---|---|
operator | PlanOperator |
key | (string | number | symbol)[] |
Returns
number
set()
set(
variable,value):void
Defined in: packages/core/src/execution-context.ts:33
Sets the current value of a variable.
Parameters
| Parameter | Type | Description |
|---|---|---|
variable | ASTIdentifier | ASTIdentifier with a single numeric part used as the array index. |
value | unknown | - |
Returns
void
setTuple()
setTuple(
item,keys):unknown[]
Defined in: packages/core/src/execution-context.ts:43
Sets the values of the item to the context variableValues.
Parameters
| Parameter | Type | Description |
|---|---|---|
item | unknown[] | The item to set. |
keys | number[] | The keys to set. |
Returns
unknown[]
The unchanged item.