Length¶
Description¶
This operation returns the number of items in the sorted set.
Method¶
Backendless.Hive( hiveName ).SortedSetStore( keyName ).length(): Promise<number>;
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. Must be a string value. |
keyName |
Key name identifying a sorted set. |
Return Value¶
The total number of elements stored in the sorted set.
Example¶
The example below returns the number of items from the 'leaderboard'
sorted set.
await Backendless.Hive('hiveName').SortedSetStore('leaderboard').length()
where:
Argument | Description |
---|---|
'hiveName' |
Name of a hive where the operation is performed. |
'leaderboard' |
The name of the sorted set to get the number of elements. |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a sorted set. |
Returns the total number of elements stored in the requested sorted set.
Consider the following Sorted Set storage:
The example below returns the number of items stored in the "players"
.
The output will look as shown below after the Codeless logic runs.