exists checks if a given member with a specific score exists in a ZSet. It also verifies if the provided key is valid. The function returns a boolean value indicating whether the member with the specified score exists in the ZSet or not. Parameters: key (string): Specifies the key of the ZSet. s
(key string, score int, member string)
| 547 | // exists in the ZSet or not. Returns false if the ZSet does not exist or if |
| 548 | // the key is invalid. |
| 549 | func (zs *ZSetStructure) exists(key string, score int, member string) bool { |
| 550 | if err := checkKey(key); err != nil { |
| 551 | return false |
| 552 | } |
| 553 | keyBytes := stringToBytesWithKey(key) |
| 554 | |
| 555 | zSet, err := zs.getZSetFromDB(keyBytes) |
| 556 | |
| 557 | if err != nil { |
| 558 | return false |
| 559 | } |
| 560 | return zSet.exists(score, member) |
| 561 | } |
| 562 | |
| 563 | /* |
| 564 | ZRem is a method belonging to ZSetStructure that removes a member from a ZSet. |
nothing calls this directly
no test coverage detected