LoopOver¶
Declares how multi-sized result fields produce CDM rows — zipping or cartesian product.
Any CDM-table mapping that uses a multi-sized result ([] or [N] on
a rule) must declare a LoopOver so the engine knows how to combine
the multiple values:
- Fields placed in the same array are zipped — the i-th result of one is paired with the i-th result of the others.
- Fields placed in different arrays form a cartesian product.
Within a single zipped group, every field must produce the same number
of results at runtime. If the [] rule is unbounded, every field in the
group must also be unbounded; if the rule is bounded with [N], every
field in the group must use the same N.
Even a CDM table with only one multi-sized field must declare it via
LoopOver.
Parameters¶
- N —
groupMandatory — accepts: array of fields (:-notation) -
The Nth zipped group. Within the array, all fields are paired by index. Multiple
grouparrays form a cartesian product.
Requires¶
- Every referenced field must produce a multi-sized result.
- Bounded multi-sized fields within a group must share the same bound.
- Unbounded multi-sized fields cannot be grouped with bounded ones.
Examples¶
Single multi-sized field
Two zipped fields
Two zipped fields × one cartesian field