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

Method KeyCopy

iterator.go:76–78  ·  view source on GitHub ↗

KeyCopy returns a copy of the key of the item, writing it to dst slice. If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and returned.

(dst []byte)

Source from the content-addressed store, hash-verified

74// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and
75// returned.
76func (item *Item) KeyCopy(dst []byte) []byte {
77 return y.SafeCopy(dst, item.key)
78}
79
80// Version returns the commit timestamp of the item.
81func (item *Item) Version() uint64 {

Callers 5

BackupMethod · 0.80
ToListMethod · 0.80
produceKVsMethod · 0.80

Calls 1

SafeCopyFunction · 0.92

Tested by 2