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

Method iterArrayValues

pkg/util/json/encoded.go:193–205  ·  view source on GitHub ↗

iterArrayValues iterates through all the values of an encoded array without requiring decoding of all of them.

()

Source from the content-addressed store, hash-verified

191// iterArrayValues iterates through all the values of an encoded array without
192// requiring decoding of all of them.
193func (j *jsonEncoded) iterArrayValues() encodedArrayIterator {
194 if j.typ != ArrayJSONType {
195 panic("can only iterate through the array values of an array")
196 }
197
198 return encodedArrayIterator{
199 dataOffset: containerHeaderLen + j.containerLen*jEntryLen,
200 curDataIdx: 0,
201 len: j.containerLen,
202 idx: 0,
203 data: j.value,
204 }
205}
206
207type encodedObjectIterator struct {
208 curKeyIdx int

Callers 2

shallowDecodeMethod · 0.95
ExistsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected