Page History
Panel | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||
UNIONAdds two collections of the same base type to a new collection. Syntax
Inputs
Return type
Venn diagram Examples Suppose you have a
| |||||||||||||||||||||||||||||||||||||||||
Panel | |||||||||||||||||||||||||||||||||||||||||
|
Code Block |
---|
INTERSECTION ( collection1 , collection2 ) |
- collection1, collection2 - Collections to be intersected. These collections must be of the same base type.
Return type
- collection
Venn diagram
Examples
Suppose the following model. Entity Teacher
has a multivalued relation with entity Child
via the relation Teacher.teaches_Children
.
Back to top |
---|
...
bgColor | white |
---|
DIFFERENCE
This function returns a collection containing all the items from collection1 that are not present in collection2.
Syntax
Code Block |
---|
DIFFERENCE ( collection1 , collection2 ) |
...
- collection1, collection2 - Collections to be compared. These collections must be of the same base type.
Return type
- collection
Venn diagram
Examples
...
Back to top |
---|
...
bgColor | white |
---|
SYMMETRIC_DIFFERENCE
This function determines the symmetric difference between two collections. It returns a collection with the elements of the provided collections which are in either one of the collections, but not in both.
Syntax
Code Block |
---|
SYMMETRIC_DIFFERENCE ( collection1 , collection2 ) |
...
- collection1, collection2 - Collections to be compared. These collections must be of the same base type.
Return type
- collection
Venn diagram
Examples
...
Back to top |
---|
...
bgColor | white |
---|
A note on collections and duplicates
An expression resulting in a collection does not contain duplicates. Please be aware however, that intermediary results of a COLLECT
statement can contain duplicates. You have to be aware of this when using the SIZE
or UNPACK
function, or when using TSL.
This is best illustrated with the following examples.
...
TSL:
The ages present are: [[[ COLLECT Person.Age FROM ALL Person ]]].
...
Now an example with the UNPACK function. We leave out the first instance from the previous example.
...
UI Text Box | ||
---|---|---|
| ||
Only the intermediary results of a |
Back to top |
---|