MCPcopy
hub / github.com/dgraph-io/badger / Item

Method Item

iterator.go:512–516  ·  view source on GitHub ↗

Item returns pointer to the current key-value pair. This item is only valid until it.Next() gets called.

()

Source from the content-addressed store, hash-verified

510// Item returns pointer to the current key-value pair.
511// This item is only valid until it.Next() gets called.
512func (it *Iterator) Item() *Item {
513 tx := it.txn
514 tx.addReadKey(it.item.Key())
515 return it.item
516}
517
518// Valid returns false when iteration is done.
519func (it *Iterator) Valid() bool {

Callers 15

deleteMoveKeysForMethod · 0.95
TestWriteBatchFunction · 0.95
TestWriteBatchManagedFunction · 0.95
TestWriteBatchDuplicateFunction · 0.95
produceKVsMethod · 0.95
TestConcurrentWriteFunction · 0.95
TestGetMoreFunction · 0.95
TestIterate2BasicFunction · 0.95
TestIterateDeletedFunction · 0.95

Calls 2

addReadKeyMethod · 0.80
KeyMethod · 0.65

Tested by 15

TestWriteBatchFunction · 0.76
TestWriteBatchManagedFunction · 0.76
TestWriteBatchDuplicateFunction · 0.76
TestConcurrentWriteFunction · 0.76
TestGetMoreFunction · 0.76
TestIterate2BasicFunction · 0.76
TestIterateDeletedFunction · 0.76
TestIterateParallelFunction · 0.76
TestDiscardVersionsBelowFunction · 0.76