MCPcopy
hub / github.com/openacid/slim / RangeGet

Method RangeGet

index/index.go:84–93  ·  view source on GitHub ↗

RangeGet returns the value of `key` that is contained in a range, and a bool value indicating if the `key` is found or not.

(key string)

Source from the content-addressed store, hash-verified

82// RangeGet returns the value of `key` that is contained in a range,
83// and a bool value indicating if the `key` is found or not.
84func (si *SlimIndex) RangeGet(key string) (string, bool) {
85 o, found := si.SlimTrie.RangeGet(key)
86 if !found {
87 return "", false
88 }
89
90 offset := o.(int64)
91
92 return si.DataReader.Read(offset, key)
93}

Callers 1

Example_indexRangesFunction · 0.95

Calls 1

ReadMethod · 0.65

Tested by 1

Example_indexRangesFunction · 0.76