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

Function NewArrayBuilder

postgres/parser/json/json.go:211–215  ·  view source on GitHub ↗

NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces based on hint about number of adds to reduce times of growing capacity.

(numAddsHint int)

Source from the content-addressed store, hash-verified

209// NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces
210// based on hint about number of adds to reduce times of growing capacity.
211func NewArrayBuilder(numAddsHint int) *ArrayBuilder {
212 return &ArrayBuilder{
213 jsons: make([]JSON, 0, numAddsHint),
214 }
215}
216
217// Add appends JSON to the sequence.
218func (b *ArrayBuilder) Add(j JSON) {

Callers 2

RemoveStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected