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

Function testLRem

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

Source from the content-addressed store, hash-verified

202}
203
204func testLRem() {
205 value := []byte("val2")
206 count := -1
207 // count := 1
208 if err := db.Update(
209 func(tx *nutsdb.Tx) error {
210 key := []byte("myList")
211 err := tx.LRem(bucket, key, count, value)
212 return err
213 }); err != nil {
214 log.Fatal(err)
215 }
216 if count < 0 {
217 count = -count
218 }
219 fmt.Println("LRem count : ", count, string(value))
220}
221
222func testLPeek() {
223 if err := db.View(

Callers 1

mainFunction · 0.85

Calls 2

UpdateMethod · 0.80
LRemMethod · 0.45

Tested by

no test coverage detected