MCPcopy Create free account
hub / github.com/dolthub/doltgresql / objectGetNthDataRange

Method objectGetNthDataRange

postgres/parser/json/encoded.go:346–352  ·  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

344// If the container is an object, the i-th entry is the i-th key, and the
345// (i+length)-th entry is the i-th value.
346func (j *jsonEncoded) objectGetNthDataRange(n int) ([]byte, jEntry, error) {
347 begin, end, entry, err := j.getNthEntryBounds(n)
348 if err != nil {
349 return nil, jEntry{}, err
350 }
351 return j.objectGetDataRange(begin, end), entry, nil
352}
353
354// objectNthValue returns the nth value in the sorted-by-key representation of
355// the object.

Callers 2

objectNthValueMethod · 0.95
FetchValKeyMethod · 0.95

Calls 2

getNthEntryBoundsMethod · 0.95
objectGetDataRangeMethod · 0.95

Tested by

no test coverage detected