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

Function testZPopMin

examples/sortedSet/main.go:215–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213}
214
215func testZPopMin() {
216 if err := db.Update(
217 func(tx *nutsdb.Tx) error {
218 bucket := "myZSet1"
219 key := []byte("key1")
220 node, err := tx.ZPopMin(bucket, key)
221 if err != nil {
222 return err
223 }
224 fmt.Println("ZPopMin:", node.Score) // val1
225 return nil
226 }); err != nil {
227 log.Fatal(err)
228 }
229}
230
231func testZRangeByRank() {
232 if err := db.Update(

Callers 1

mainFunction · 0.85

Calls 2

UpdateMethod · 0.80
ZPopMinMethod · 0.45

Tested by

no test coverage detected