MCPcopy Create free account
hub / github.com/distributedio/titan / GetSet

Method GetSet

db/string.go:109–115  ·  view source on GitHub ↗

GetSet returns old value ,value replace old value

(value []byte)

Source from the content-addressed store, hash-verified

107
108// GetSet returns old value ,value replace old value
109func (s *String) GetSet(value []byte) ([]byte, error) {
110 v := s.Meta.Value
111 if err := s.Set(value); err != nil {
112 return nil, err
113 }
114 return v, nil
115}
116
117// GetRange returns string from the absolute of start to the absolute of end
118func (s *String) GetRange(start, end int) []byte {

Callers 2

GetSetFunction · 0.80
TestStringGetSetFunction · 0.80

Calls 1

SetMethod · 0.95

Tested by 1

TestStringGetSetFunction · 0.64