MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / ZExist

Method ZExist

sorted_set.go:257–267  ·  view source on GitHub ↗
(key string, value []byte)

Source from the content-addressed store, hash-verified

255}
256
257func (z *SortedSet) ZExist(key string, value []byte) (bool, error) {
258 if sortedSet, ok := z.M[key]; ok {
259 hash, err := utils.GetFnv32(value)
260 if err != nil {
261 return false, err
262 }
263 _, ok := sortedSet.dict[hash]
264 return ok, nil
265 }
266 return false, ErrSortedSetNotFound
267}
268
269// SCORE represents the score type.
270type SCORE float64

Callers 2

keyExistsInSortedSetMethod · 0.80
ZRemMethod · 0.80

Calls 1

GetFnv32Function · 0.92

Tested by

no test coverage detected