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

Method iterArrayValues

pkg/util/json/encoded.go:196–208  ·  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

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

Callers 2

shallowDecodeMethod · 0.95
ExistsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected