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

Function NewArrayBuilder

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

194// NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces
195// based on hint about number of adds to reduce times of growing capacity.
196func NewArrayBuilder(numAddsHint int) *ArrayBuilder {
197 return &ArrayBuilder{
198 jsons: make([]JSON, 0, numAddsHint),
199 }
200}
201
202// Add appends JSON to the sequence.
203func (b *ArrayBuilder) Add(j JSON) {

Callers 3

AsJSONFunction · 0.92
RemoveStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…