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 containing key names each identifying a set. Must be an array of string values. |
Return Value¶
An array of unique values found in specified sets. Every element can be of any data type.
Example¶
The example below returns unique values found in the following sets: 'cars'
and 'cars'
.
await Backendless.Hive('transport').SetStore.union(['cars', 'cars_2'])
where:
Argument | Description |
---|---|
'transport' |
Name of a hive where the operation is performed. |
['cars', 'cars_2'] |
An array of key names each identifying a set containing multiple values. |
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.