MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / objectGetNthDataRange

Method objectGetNthDataRange

pkg/util/json/encoded.go:332–338  ·  view source on GitHub ↗

objectGetNthDataRange returns the byte subslice and jEntry of the given nth entry. If the container is an object, the i-th entry is the i-th key, and the (i+length)-th entry is the i-th value.

(n int)

Source from the content-addressed store, hash-verified

330// If the container is an object, the i-th entry is the i-th key, and the
331// (i+length)-th entry is the i-th value.
332func (j *jsonEncoded) objectGetNthDataRange(n int) ([]byte, jEntry, error) {
333 begin, end, entry, err := j.getNthEntryBounds(n)
334 if err != nil {
335 return nil, jEntry{}, err
336 }
337 return j.objectGetDataRange(begin, end), entry, nil
338}
339
340// objectNthValue returns the nth value in the sorted-by-key representation of
341// the object.

Callers 2

objectNthValueMethod · 0.95
FetchValKeyMethod · 0.95

Calls 2

getNthEntryBoundsMethod · 0.95
objectGetDataRangeMethod · 0.95

Tested by

no test coverage detected