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

Function testLKeys

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

Source from the content-addressed store, hash-verified

289}
290
291func testLKeys() {
292 if err := db.View(
293 func(tx *nutsdb.Tx) error {
294 var keys []string
295 err := tx.LKeys(bucket, "*", func(key string) bool {
296 keys = append(keys, key)
297 // true: continue, false: break
298 return true
299 })
300 fmt.Printf("keys: %v\n", keys)
301 return err
302 }); err != nil {
303 log.Fatal(err)
304 }
305}

Callers 1

mainFunction · 0.85

Calls 4

appendFunction · 0.85
ViewMethod · 0.80
LKeysMethod · 0.80
PrintfMethod · 0.65

Tested by

no test coverage detected