Combine

relational-functions combine

syntax

  • combine(a, b, … , n)

definition

combine(a, b, … , n) results in a uint32 domain-unit with the cartesian product of the domain units a, b, …, n.

The number of elements of the new domain unit is the multiplication of the number of elements of a, b, …, n.

description

The combine function generates subitems, relations to the individual original domains. In the example first_rel for NHDomain and second_rel for YearDomain. N.B. when combining large domains, using these relations can explode memory usage. It is advised to prevent using those is those situations. It can therefore be useful to use the combine variant that doesn’t create the subitems: combine_unit_uint8_16_32_64.

These data items contain relations to the original domain-unit and can be used in a lookup function to relate attributes to the new domain-unit, see the example.

Use the combine_data function to combine values of data items, resulting in a data item with the unit resulting from the combine-function as values-unit.

Use a combine_uint8_16_32_64 function to configure a domain unit for another value type.

applies to

  • unit a, b, …, n with value type from group CanBeDomainUnit

conditions

The combine-functions combine a maximum of six domain units. Use a combine in a combine if more domain units need to be combined.

example

unit<uint32> NHCityYear := combine(NHCity, YearDomain)
{ 
   attribute<string> NHCity_name := NHCity/name[first_rel];
   attribute<string> Year        := YearDomain/Year[second_rel];
}

see also