Delete Values With Min Score¶
This operation retrieves and deletes items with the lowest scores from the sorted set. You can specify the number of values to retrieve and delete.
Backendless.Hive( hiveName ).SortedSetStore( keyName ).getAndDeleteMinScore( count ): Promise<items>;
||Name of a hive in the system where the operation is performed. Must be a string.|
||Key name of a sorted set where score-values with the lowest scores are retrieved and deleted from.|
||Optional parameter, if not specified, defaults to 1. Number of values to deleted from the sorted set.|
An array of the deleted score-value pairs. Each element in the array is an array of two elements: score and the corresponding value.
The example below will delete five items with the lowest scores from the
'leaderboard' sorted set.
||Name of a hive in the system.|
||Key name of a sorted set where to retrieve and delete items from.|
||Name of a hive where the operation is performed.|
||Key name identifying a sorted set.|
||Specify the number of items to delete from the sorted set.|
Returns a list of the deleted score-value pairs.
Consider the following Sorted Set storage:
The example below deletes one value with the minimum score from the
"players" sorted set. Considering the sorted set presented above, the value
"Bobby" is deleted since it has the lowest score.
The sorted set will look as shown below after the Codeless logic runs.