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

Function Build

sup/builder.go:18–25  ·  view source on GitHub ↗
(b *scode.Builder, val Value)

Source from the content-addressed store, hash-verified

16)
17
18func Build(b *scode.Builder, val Value) (super.Value, error) {
19 b.Truncate()
20 if err := buildValue(b, val); err != nil {
21 return super.Null, err
22 }
23 it := b.Bytes().Iter()
24 return super.NewValue(val.TypeOf(), it.Next()), nil
25}
26
27func buildValue(b *scode.Builder, val Value) error {
28 switch val := val.(type) {

Callers 5

TestSUPBuilderFunction · 0.92
ReadMethod · 0.92
ParseValueFunction · 0.70
ParseValueFromASTFunction · 0.70
UnmarshalMethod · 0.70

Calls 7

NewValueFunction · 0.92
buildValueFunction · 0.85
TruncateMethod · 0.80
IterMethod · 0.80
TypeOfMethod · 0.65
BytesMethod · 0.45
NextMethod · 0.45

Tested by 1

TestSUPBuilderFunction · 0.74