has_any - ObjectVision/GeoDMS GitHub Wiki
Aggregation functions has_any
- has_any(a)
has_any(a) is a boolean variant of the pcount function, resulting in the value true if the number of entries of a relation in the related domain unit is more than zero and false if this number is zero. The has_any(a) function can be defined as pcount(a) > 0.
Use the has_any in stead of the pcount function in cases where not the number of cases but only the fact that cases occur is relevant, as the has_any function uses less memory.
- attribute a with uint2, uint4, uint8, uint16, uint32, spoint, ipoint or bool value type
attribute<uint32> has_anyReg (Region) := has_any(City/Region_rel);
City/Region_rel |
---|
0 |
1 |
2 |
1 |
3 |
null |
3 |
domain City, nr of rows = 7
has_anyReg |
---|
true |
true |
true |
true |
false |
domain Region, nr of rows = 5