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

Method ZAdd

sorted_set.go:54–62  ·  view source on GitHub ↗
(key string, score SCORE, value []byte, record *core.Record)

Source from the content-addressed store, hash-verified

52}
53
54func (z *SortedSet) ZAdd(key string, score SCORE, value []byte, record *core.Record) error {
55 sortedSet, ok := z.M[key]
56 if !ok {
57 z.M[key] = newSkipList(z.db)
58 sortedSet = z.M[key]
59 }
60
61 return sortedSet.Put(score, value, record)
62}
63
64func (z *SortedSet) ZMembers(key string) (map[*core.Record]SCORE, error) {
65 sortedSet, ok := z.M[key]

Callers

nothing calls this directly

Calls 2

newSkipListFunction · 0.85
PutMethod · 0.45

Tested by

no test coverage detected