MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / newSkipListNodeValue

Function newSkipListNodeValue

structure/zset.go:211–221  ·  view source on GitHub ↗

newSkipListNodeValue is a function that constructs and returns a new ZSetValue. It takes a score (int), a key (string), and a value (interface{}) as parameters. These parameters serve as the initial state of the ZSetValue upon its creation.

(score int, member string, value interface{})

Source from the content-addressed store, hash-verified

209// It takes a score (int), a key (string), and a value (interface{}) as parameters.
210// These parameters serve as the initial state of the ZSetValue upon its creation.
211func newSkipListNodeValue(score int, member string, value interface{}) *ZSetValue {
212 // Create a new instance of a ZSetValue with the provided score, key, and value.
213 node := &ZSetValue{
214 score: score,
215 member: member,
216 value: value,
217 }
218
219 // Return the newly created ZSetValue.
220 return node
221}
222
223// insert is a method of the SkipList type that is used to insert a new node into the skip list. It takes as arguments
224// the score (int), key (string) and a value (interface{}), and returns a pointer to the ZSetValue struct. The method

Callers 1

newSkipListNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected