Delete Value(s)¶
Description¶
This operation deletes multiple values from a sorted set.
Method¶
Delete a single 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. Must be a string value. |
keyName |
Key name identifying a sorted set. |
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 and structure as the one stored in the sorted set. |
Return Value¶
Number of items deleted from the sorted set.
Example¶
The example below deletes the 'Alice'
and 'Bob'
items from the sorted set.
await Backendless.Hive( 'demoHive' ).SortedSetStore( 'leaderboard' ).deleteValues( ['Alice', 'Bob'] )
where:
Argument | Description |
---|---|
'demoHive' |
Name of a hive where the operation is performed. |
'leaderboard' |
Key name identifying a sorted set. |
['Alice', 'Bob'] |
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.