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

Function NewEntry

structs.go:171–176  ·  view source on GitHub ↗

NewEntry creates a new entry with key and value passed in args. This newly created entry can be set in a transaction by calling txn.SetEntry(). All other properties of Entry can be set by calling WithMeta, WithDiscard, WithTTL methods on it. This function uses key and value reference, hence users mu

(key, value []byte)

Source from the content-addressed store, hash-verified

169// This function uses key and value reference, hence users must
170// not modify key and value until the end of transaction.
171func NewEntry(key, value []byte) *Entry {
172 return &Entry{
173 Key: key,
174 Value: value,
175 }
176}
177
178// WithMeta adds meta data to Entry e. This byte is stored alongside the key
179// and can be used as an aid to interpret the value or store other contextual

Callers 15

SetMethod · 0.85
TestDropAllManagedFunction · 0.85
TestWriteAfterCloseFunction · 0.85
TestDropAllRaceFunction · 0.85
TestDropPrefixRaceFunction · 0.85
AddMethod · 0.85
ReleaseMethod · 0.85
updateLeaseMethod · 0.85
txnSetFunction · 0.85
TestUpdateAndViewFunction · 0.85
TestTxnTooBigFunction · 0.85
TestForceCompactL0Function · 0.85

Calls

no outgoing calls

Tested by 15

TestDropAllManagedFunction · 0.68
TestWriteAfterCloseFunction · 0.68
TestDropAllRaceFunction · 0.68
TestDropPrefixRaceFunction · 0.68
txnSetFunction · 0.68
TestUpdateAndViewFunction · 0.68
TestTxnTooBigFunction · 0.68
TestForceCompactL0Function · 0.68
BenchmarkDbGrowthFunction · 0.68
TestGetMoreFunction · 0.68
TestExistsMoreFunction · 0.68
TestIterateParallelFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…