MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / objectNthValue

Method objectNthValue

pkg/util/json/encoded.go:339–345  ·  view source on GitHub ↗

objectNthValue returns the nth value in the sorted-by-key representation of the object.

(n int)

Source from the content-addressed store, hash-verified

337// objectNthValue returns the nth value in the sorted-by-key representation of
338// the object.
339func (j *jsonEncoded) objectNthValue(n int) (JSON, error) {
340 data, entry, err := j.objectGetNthDataRange(j.containerLen + n)
341 if err != nil {
342 return nil, err
343 }
344 return newEncoded(entry, data)
345}
346
347func parseJEntry(jEntry uint32) (isOff bool, offlen int) {
348 return (jEntry & jEntryIsOffFlag) != 0, int(jEntry & jEntryOffLenMask)

Callers 1

FetchValKeyMethod · 0.95

Calls 2

objectGetNthDataRangeMethod · 0.95
newEncodedFunction · 0.85

Tested by

no test coverage detected