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

Method SetEntry

txn.go:419–421  ·  view source on GitHub ↗

SetEntry takes an Entry struct and adds the key-value pair in the struct, along with other metadata to the database. The current transaction keeps a reference to the entry passed in argument. Users must not modify the entry until the end of the transaction.

(e *Entry)

Source from the content-addressed store, hash-verified

417// The current transaction keeps a reference to the entry passed in argument.
418// Users must not modify the entry until the end of the transaction.
419func (txn *Txn) SetEntry(e *Entry) error {
420 return txn.modify(e)
421}
422
423// Delete deletes a key.
424//

Callers 15

SetMethod · 0.95
TestDropAllManagedFunction · 0.45
TestWriteAfterCloseFunction · 0.45
TestDropAllRaceFunction · 0.45
TestDropPrefixRaceFunction · 0.45
TestWriteBatchDuplicateFunction · 0.45
AddMethod · 0.45
ReleaseMethod · 0.45
updateLeaseMethod · 0.45
txnSetFunction · 0.45
TestUpdateAndViewFunction · 0.45
TestTxnTooBigFunction · 0.45

Calls 1

modifyMethod · 0.95

Tested by 15

TestDropAllManagedFunction · 0.36
TestWriteAfterCloseFunction · 0.36
TestDropAllRaceFunction · 0.36
TestDropPrefixRaceFunction · 0.36
TestWriteBatchDuplicateFunction · 0.36
txnSetFunction · 0.36
TestUpdateAndViewFunction · 0.36
TestTxnTooBigFunction · 0.36
TestForceCompactL0Function · 0.36
BenchmarkDbGrowthFunction · 0.36
TestGetMoreFunction · 0.36
TestExistsMoreFunction · 0.36