MCPcopy Create free account
hub / github.com/brimdata/super / TransformContainer

Method TransformContainer

scode/builder.go:115–119  ·  view source on GitHub ↗

TransformContainer calls transform, passing it the body of the most recently opened container and replacing the original body with the return value. It panics if the receiver has no open container.

(transform func(Bytes) Bytes)

Source from the content-addressed store, hash-verified

113// opened container and replacing the original body with the return value. It
114// panics if the receiver has no open container.
115func (b *Builder) TransformContainer(transform func(Bytes) Bytes) {
116 bodyOff := b.containers[len(b.containers)-1]
117 body := transform(b.bytes[bodyOff:])
118 b.bytes = append(b.bytes[:bodyOff], body...)
119}
120
121// Append appends val.
122func (b *Builder) Append(val []byte) {

Callers 13

TestNormalizeSetFunction · 0.95
TestValueValidateFunction · 0.95
TestBuilderFunction · 0.95
SerializeMethod · 0.80
SerializeMethod · 0.80
encodeMapMethod · 0.80
encodeArrayMethod · 0.80
buildSetFunction · 0.80
buildMapFunction · 0.80
GenValueFunction · 0.80
appendFieldsMethod · 0.80
buildScodeMethod · 0.80

Implementers 15

DynamicBuildervector/builder.go
recordBuildervector/builder.go
arraySetBuildervector/builder.go
mapBuildervector/builder.go
unionBuildervector/builder.go
fusionBuildervector/builder.go
enumBuildervector/builder.go
intBuildervector/builder.go
uintBuildervector/builder.go
floatBuildervector/builder.go
boolBuildervector/builder.go
bytesStringTypeBuildervector/builder.go

Calls

no outgoing calls

Tested by 3

TestNormalizeSetFunction · 0.76
TestValueValidateFunction · 0.76
TestBuilderFunction · 0.76