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

Method Add

postgres/parser/json/json.go:245–249  ·  view source on GitHub ↗

Add appends JSON to the sequence and updates the size counter.

(j JSON)

Source from the content-addressed store, hash-verified

243
244// Add appends JSON to the sequence and updates the size counter.
245func (b *ArrayBuilderWithCounter) Add(j JSON) {
246 oldCap := cap(b.ab.jsons)
247 b.ab.Add(j)
248 b.size += j.Size() + (uintptr)(cap(b.ab.jsons)-oldCap)*jsonInterfaceSize
249}
250
251// Build returns a JSON array built from a JSON sequence. After that, it should
252// not be modified any longer.

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected