(key string, start int, end int)
| 161 | } |
| 162 | |
| 163 | func (z *SortedSet) ZRangeByRank(key string, start int, end int) ([]*core.Record, []float64, error) { |
| 164 | if sortedSet, ok := z.M[key]; ok { |
| 165 | |
| 166 | nodes := sortedSet.GetByRankRange(start, end, false) |
| 167 | |
| 168 | records := make([]*core.Record, len(nodes)) |
| 169 | scores := make([]float64, len(nodes)) |
| 170 | |
| 171 | for i, node := range nodes { |
| 172 | records[i] = node.record |
| 173 | scores[i] = float64(node.score) |
| 174 | } |
| 175 | |
| 176 | return records, scores, nil |
| 177 | } |
| 178 | |
| 179 | return nil, nil, ErrSortedSetNotFound |
| 180 | } |
| 181 | |
| 182 | func (z *SortedSet) ZRem(key string, value []byte) (*core.Record, error) { |
| 183 | if sortedSet, ok := z.M[key]; ok { |
nothing calls this directly
no test coverage detected