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

Function testSCard

examples/set/main.go:98–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98func testSCard() {
99 if err := db.View(
100 func(tx *nutsdb.Tx) error {
101 key := []byte("mySet")
102 num, err := tx.SCard(bucket, key)
103 if err != nil {
104 return err
105 }
106 fmt.Println("SCard:", num)
107 return nil
108 }); err != nil {
109 log.Fatal(err)
110 }
111}
112
113func testSDiffByOneBucket() {
114 key1 := []byte("mySet1")

Callers 1

mainFunction · 0.85

Calls 2

ViewMethod · 0.80
SCardMethod · 0.45

Tested by

no test coverage detected