(key string, value []byte)
| 180 | } |
| 181 | |
| 182 | func (z *SortedSet) ZRem(key string, value []byte) (*core.Record, error) { |
| 183 | if sortedSet, ok := z.M[key]; ok { |
| 184 | hash, err := utils.GetFnv32(value) |
| 185 | if err != nil { |
| 186 | return nil, err |
| 187 | } |
| 188 | node := sortedSet.Remove(hash) |
| 189 | if node != nil { |
| 190 | return node.record, nil |
| 191 | } |
| 192 | return nil, ErrSortedSetMemberNotExist |
| 193 | } |
| 194 | |
| 195 | return nil, ErrSortedSetNotFound |
| 196 | } |
| 197 | |
| 198 | func (z *SortedSet) ZRemRangeByRank(key string, start int, end int) error { |
| 199 | if sortedSet, ok := z.M[key]; ok { |