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

Function testZPopMax

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

Source from the content-addressed store, hash-verified

197}
198
199func testZPopMax() {
200 if err := db.Update(
201 func(tx *nutsdb.Tx) error {
202 bucket := "myZSet1"
203 key := []byte("key1")
204 node, err := tx.ZPopMax(bucket, key)
205 if err != nil {
206 return err
207 }
208 fmt.Println("ZPopMax:", node.Score) // val3
209 return nil
210 }); err != nil {
211 log.Fatal(err)
212 }
213}
214
215func testZPopMin() {
216 if err := db.Update(

Callers 1

mainFunction · 0.85

Calls 2

UpdateMethod · 0.80
ZPopMaxMethod · 0.45

Tested by

no test coverage detected