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

Function testZCard

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

Source from the content-addressed store, hash-verified

81}
82
83func testZCard() {
84 if err := db.View(
85 func(tx *nutsdb.Tx) error {
86 bucket := "myZSet1"
87 key := []byte("key1")
88 num, err := tx.ZCard(bucket, key)
89 if err != nil {
90 return err
91 }
92 fmt.Println("ZCard num", num)
93 return nil
94 }); err != nil {
95 log.Fatal(err)
96 }
97}
98
99func testZCount() {
100 if err := db.Update(

Callers 1

mainFunction · 0.85

Calls 2

ViewMethod · 0.80
ZCardMethod · 0.45

Tested by

no test coverage detected