We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e018934 commit 20cdc15Copy full SHA for 20cdc15
data/frame.go
@@ -550,3 +550,14 @@ func (f *Frame) FieldByName(fieldName string) (*Field, int) {
550
}
551
return nil, -1
552
553
+
554
+// TypeInfo returns the FrameType and FrameTypeVersion from the frame's
555
+// Meta.Type and Meta.TypeVersion properties. If either of those properties
556
+// are absent, the corresponding zero value (FrameTypeUnknown and FrameTypeVersion{0,0})
557
+// is returned per each missing property.
558
+func (f *Frame) TypeInfo(fieldName string) (FrameType, FrameTypeVersion) {
559
+ if f == nil || f.Meta == nil {
560
+ return FrameTypeUnknown, FrameTypeVersion{}
561
+ }
562
+ return f.Meta.Type, f.Meta.TypeVersion
563
+}
0 commit comments