Delete Value(s)¶
Description¶
This operation deletes multiple values from a sorted set.
Method¶
// Delete One Value
Backendless.Hive( hiveName ).SortedSetStore( keyName ).deleteValue( value ): Promise<number>;
// Delete Multiple Values
Backendless.Hive( hiveName ).SortedSetStore( keyName ).deleteValues( values[] ): Promise<number>;
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyName |
Key name identifying a sorted-set. String value. |
value |
A value to delete from the requested sorted set. Must be of the same data type and structure as the one stored in the sorted set. |
values |
An array of values to delete from the specified sorted-set. Each value must be of the same data type as the one stored in the sorted set. |
Return Value¶
A number of deleted values. Returns 0
if the values do not exist in the sorted set.
Example¶
The example below deletes the specified values( 'Dave'
and 'Frank'
) from the sorted set.
await Backendless.Hive( 'leaderboard' ).SortedSetStore( 'players' ).deleteValues( ['Dave', 'Frank'] )
where:
Argument | Description |
---|---|
'leaderboard' |
Name of a hive where the operation is performed. |
'players' |
Key name identifying a sorted set for the operation. |
'Dave', 'Frank' |
Values to delete. |
Codeless Reference
¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a sorted set. |
values |
A list of values to delete from the specified sorted set. Each value must be of the same data type and structure as the one stored in the sorted set. |
Returns the number of items deleted from the sorted set.
Consider the following Sorted Set storage:
The example below deletes the following values from the "players"
sorted set: "John"
and "Bobby"
.
The sorted set will look as shown below after the Codeless logic runs.