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

Function testRPop

examples/list/main.go:152–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152func testRPop() {
153 if err := db.Update(
154 func(tx *nutsdb.Tx) error {
155 key := []byte("myList")
156 item, err := tx.RPop(bucket, key)
157 if err != nil {
158 return err
159 }
160 fmt.Println("RPop item:", string(item)) // val2
161 return nil
162 }); err != nil {
163 log.Fatal(err)
164 }
165}
166
167func testRPushItems() {
168 val1 := []byte("val1")

Callers 1

mainFunction · 0.85

Calls 2

UpdateMethod · 0.80
RPopMethod · 0.45

Tested by

no test coverage detected