Union¶
Description¶
This operation creates a union of unique values from the specified sets. A union is a set made by combining unique elements of two or more sets.
Method¶
Backendless.Hive(hiveName).SetStore.union(keyNames): Promise<values[]>;
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyNames |
An array of keys representing set names. Keys must be of the string type. |
Return Value¶
An array of unique values found in specified sets.
Example¶
The example below returns unique values found in the following sets: 'cars'
and 'cars_2'
.
await Backendless.Hive('transport').SetStore.union(['cars', 'cars_2'])
where:
Argument | Description |
---|---|
'transport' |
Name of a hive where the operation is performed. |
Contents Of Specified Sets
Response¶
The output will look as shown below after this operation runs.
Codeless Reference
¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key names |
A list containing key names identifying unique sets. |
Returns a list of identical values derived from multiple sets.
Consider the following Set storage:
The example below returns unique values found in the following sets: 'cars'
and 'cars_2'
.
The output will look as shown below after the Codeless logic runs.