Delete Value(s)¶
Description¶
This operation deletes multiple values from a sorted set.
Method¶
Backendless.Hive(hiveName).SortedSetStore(storeKey).delete(values);
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
storeKey |
Key name identifying a sorted-set. String value. |
values |
A set 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.
Set<String> values = new HashSet<>();
values.add( "\"Dave\"" );
values.add( "\"Frank\"" );
Backendless.Hive("leaderboard").SortedSetStore("players").delete(values);
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.