Intersection¶
Description¶
This operation finds and returns identical values between two or more sets.
Method¶
Backendless.Hive(hiveName).SetStore().intersection(keyNames);
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyNames |
A set containing key names each identifying a set. Must be a set of string values. |
Return Value¶
An array containing identical values found between the primary set and all consecutive sets included in the operation. Each individual value is of the any data type.
Example¶
The example below finds and returns identical values found between the primary set (i.e. "cars"
) and the secondary set (i.e. "cars_2"
).
Set<String> keyNames = new HashSet<>();
keyNames.add( "cars" );
keyNames.add( "cars_2" );
Backendless.Hive("transport").SetStore().intersection(keyNames);
where:
Argument | Description |
---|---|
"transport" |
Name of a hive where the operation is performed. |
keyNames |
A set 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. Only identical values found between the primary set("cars"
) and the secondary set("cars_2"
) are included in the response.
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 storages:
The example below finds and returns identical values found between the primary set (i.e. "cars"
) and the secondary set (i.e. "cars_2"
).
The output will look as shown below after the Codeless logic runs. Only identical values found between the primary set("cars"
) and the secondary set("cars_2"
) are included in the response.