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

Method GetByValue

sorted_set.go:771–774  ·  view source on GitHub ↗

GetByValue returns the node at given key. If node is not found, nil is returned Time complexity : O(1).

(value []byte)

Source from the content-addressed store, hash-verified

769//
770// Time complexity : O(1).
771func (sl *SkipList) GetByValue(value []byte) *SkipListNode {
772 hash, _ := utils.GetFnv32(value)
773 return sl.dict[hash]
774}
775
776// FindRank Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.
777// Note that the rank is 1-based integer. Rank 1 means the first node

Callers 1

ZScoreMethod · 0.80

Calls 1

GetFnv32Function · 0.92

Tested by

no test coverage detected