ClickHouse/programs/diagnostics/internal/platform/data/misc.go
2022-07-01 11:43:07 +02:00

28 lines
556 B
Go

package data
func NewHierarchicalFrame(name string, frame Frame, subFrames []HierarchicalFrame) HierarchicalFrame {
return HierarchicalFrame{
name: name,
DataFrame: frame,
SubFrames: subFrames,
}
}
type HierarchicalFrame struct {
name string
DataFrame Frame
SubFrames []HierarchicalFrame
}
func (hf HierarchicalFrame) Name() string {
return hf.name
}
func (hf HierarchicalFrame) Columns() []string {
return hf.DataFrame.Columns()
}
func (hf HierarchicalFrame) Next() ([]interface{}, bool, error) {
return hf.DataFrame.Next()
}