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

Method ProjectMetadata

csup/object.go:81–96  ·  view source on GitHub ↗
(sctx *super.Context, projection field.Projection)

Source from the content-addressed store, hash-verified

79}
80
81func (o *Object) ProjectMetadata(sctx *super.Context, projection field.Projection) []super.Value {
82 var b scode.Builder
83 var values []super.Value
84 root := o.cctx.Lookup(o.Root())
85 if root, ok := root.(*Dynamic); ok {
86 for _, id := range root.Values {
87 b.Reset()
88 typ := metadataValue(o.cctx, sctx, &b, id, projection)
89 values = append(values, super.NewValue(typ, b.Bytes().Body()))
90 }
91 } else {
92 typ := metadataValue(o.cctx, sctx, &b, o.Root(), projection)
93 values = append(values, super.NewValue(typ, b.Bytes().Body()))
94 }
95 return values
96}

Callers 2

pruneObjectFunction · 0.80

Calls 7

RootMethod · 0.95
ResetMethod · 0.95
BytesMethod · 0.95
NewValueFunction · 0.92
metadataValueFunction · 0.85
BodyMethod · 0.80
LookupMethod · 0.65

Tested by 1