MCPcopy
hub / github.com/dgraph-io/dgraph / ValueWithLockHeld

Method ValueWithLockHeld

posting/list.go:2022–2032  ·  view source on GitHub ↗
(readTs uint64)

Source from the content-addressed store, hash-verified

2020}
2021
2022func (l *List) ValueWithLockHeld(readTs uint64) (rval types.Val, rerr error) {
2023 val, found, err := l.findValue(readTs, math.MaxUint64)
2024 if err != nil {
2025 return val, errors.Wrapf(err,
2026 "cannot retrieve default value from list with key %s", hex.EncodeToString(l.key))
2027 }
2028 if !found {
2029 return val, ErrNoValue
2030 }
2031 return val, nil
2032}
2033
2034// ValueFor returns a value from posting list, according to preferred language list.
2035// If list is empty, value without language is returned; if such value is not

Callers 1

ValueMethod · 0.95

Calls 1

findValueMethod · 0.95

Tested by

no test coverage detected