Length¶
Description¶
This operation counts the number of elements in the set and returns the total.
Method¶
Backendless.Hive(hiveName).SetStore(keyName).length(): Promise<number>;
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyName |
Key name identifying a set. String value. |
Return Value¶
The number of items stored in the set
Example¶
The example below returns the number of items stored in the 'cars'
set.
await Backendless.Hive('transport').SetStore('cars').length()
where:
Argument | Description |
---|---|
'transport' |
Name of a hive where the operation is performed. |
'cars' |
Key name identifying a set. |
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 the number of items stored in the set.
Consider the following Set storage:
The example below returns the number of items stored in the "cars"
set.
The logic produces the following output: