ZREVRANK
Syntax
ZREVRANK key member [WITHSCORE]
Module
sortedsetCategories
read slow sortedsetDescription
Returns the rank of the member in the sorted set in reverse order. WITHSCORE modifies the result to include the score.
Options
- WITHSCORE - Determines whether to return the score along with the member value.
Examples
- Go (Embedded)
- CLI
Get the rank of the specified member in the sorted set:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
member, err := vault.ZRevRank("key", "member", true)
Get the rank of the specified member in the sorted set:
> ZREVRANK key member WITHSCORE