new CdtContext()
Nested CDT context type.
- Since:
-
- v3.12.0
- Source:
- See:
-
ListOperation#withContext
Adding context to list operationsMap#Operation#withContext
Adding context to map operations
Methods
-
<static> getContextType(ctx,, type,)
-
Retrieve expression type list/map from ctx or from type.
Parameters:
Name Type Description ctx,
CdtContext ctx value object.
type,
number exp.type
default expression type.- Source:
Returns:
exp.type
expression type.- Type
- number
-
addListIndex(index)
Lookup list by index offset.
-
If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples:
- 0: First item.
- 4: Fifth item.
- -1: Last item.
- -3: Third to last item.
Parameters:
Name Type Description index
number List index
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addListRank(rank)
Lookup list by rank.
-
Examples:
- 0 = smallest value
- N = Nth smallest value
- -1 = largest value
Parameters:
Name Type Description rank
number List rank
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addListValue(value)
Lookup list by value.
-
Parameters:
Name Type Description value
any List value
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addMapIndex(index)
Lookup map by index offset.
-
If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples:
- 0: First item.
- 4: Fifth item.
- -1: Last item.
- -3: Third to last item.
Parameters:
Name Type Description index
number Map index
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addMapKey(key)
Lookup map by key.
-
Parameters:
Name Type Description key
any Map key
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addMapRank(rank)
Lookup map by rank.
-
Examples:
- 0 = smallest value
- N = Nth smallest value
- -1 = largest value
Parameters:
Name Type Description rank
number Map rank
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext
-
addMapValue(value)
Lookup map by value.
-
Parameters:
Name Type Description value
any Map value
- Source:
Returns:
Updated CDT context, so calls can be chained.
- Type
- CdtContext