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

Method Add

pkg/util/json/json.go:261–266  ·  view source on GitHub ↗

Add appends key value pair to the sequence.

(k string, v JSON)

Source from the content-addressed store, hash-verified

259
260// Add appends key value pair to the sequence.
261func (b *ObjectBuilder) Add(k string, v JSON) {
262 if b.pairs == nil {
263 panic(errors.AssertionFailedf(msgModifyAfterBuild))
264 }
265 b.pairs = append(b.pairs, jsonKeyValuePair{k: jsonString(k), v: v})
266}
267
268// Build returns a JSON object built from a key value pair sequence. After that,
269// it should not be modified any longer.

Callers 2

normalizeMethod · 0.95
AsJSONFunction · 0.95

Calls 1

jsonStringTypeAlias · 0.85

Tested by

no test coverage detected