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

Method DerefByColumn

value.go:345–355  ·  view source on GitHub ↗
(col int)

Source from the content-addressed store, hash-verified

343}
344
345func (v *Value) DerefByColumn(col int) (*Value, bool) {
346 if v != nil {
347 if bytes, none, ok := v.nth(col); ok {
348 if none {
349 return nil, true
350 }
351 return NewValue(v.Fields()[col].Type, bytes).Ptr(), false
352 }
353 }
354 return nil, false
355}
356
357func (v Value) IndexOfField(field string) (int, bool) {
358 if typ := TypeRecordOf(v.Type()); typ != nil {

Callers 4

DerefMethod · 0.95
DerefWithNoneMethod · 0.95
unmarshalHeadersFunction · 0.80
WriteMethod · 0.80

Calls 4

nthMethod · 0.95
FieldsMethod · 0.95
NewValueFunction · 0.85
PtrMethod · 0.80

Tested by

no test coverage detected