Help us shape the future of Go! Take the 2026 Go Developer Survey

objects

package
v0.33.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableType = semantic.NewObjectPolyType(
		map[string]semantic.PolyType{
			"schema": semantic.NewArrayPolyType(SchemaType),
		},
		semantic.LabelSet{"schema"},
		semantic.LabelSet{"schema"},
	)
	TableMonoType, _ = TableType.MonoType()
	SchemaType       = semantic.NewObjectPolyType(
		map[string]semantic.PolyType{
			"label":   semantic.String,
			"grouped": semantic.Bool,

			"type": semantic.String,
		},
		semantic.LabelSet{"label", "type", "grouped"},
		semantic.LabelSet{"label", "type", "grouped"},
	)
	SchemaMonoType, _ = SchemaType.MonoType()
)

A Table is an object with a schema. Schema is the only attribute that the table exposes. To extract records or columns one must use the provided functions (getRecord/getColumn). TODO(affo): we decided not to expose the schema, for now.

Functions

This section is empty.

Types

type Table

type Table struct {
	flux.Table
	// contains filtered or unexported fields
}

Table is a values.Value that represents a table in Flux. (Unlike flux.TableObject which represents a stream of tables.)

func NewTable

func NewTable(tbl flux.Table) *Table

func (*Table) Array

func (t *Table) Array() values.Array

func (*Table) Bool

func (t *Table) Bool() bool

func (*Table) Duration

func (t *Table) Duration() values.Duration

func (*Table) Equal

func (t *Table) Equal(other values.Value) bool

func (*Table) Float

func (t *Table) Float() float64

func (*Table) Function

func (t *Table) Function() values.Function

func (*Table) Get

func (t *Table) Get(name string) (values.Value, bool)

func (*Table) Int

func (t *Table) Int() int64

func (*Table) IsNull

func (t *Table) IsNull() bool

func (*Table) Len

func (t *Table) Len() int

func (*Table) Object

func (t *Table) Object() values.Object

func (*Table) PolyType

func (t *Table) PolyType() semantic.PolyType

func (*Table) Range

func (t *Table) Range(fn func(name string, v values.Value))

func (*Table) Regexp

func (t *Table) Regexp() *regexp.Regexp

func (*Table) Set

func (t *Table) Set(name string, v values.Value)

func (*Table) Str

func (t *Table) Str() string

func (*Table) String

func (t *Table) String() string

func (*Table) Time

func (t *Table) Time() values.Time

func (*Table) Type

func (t *Table) Type() semantic.Type

func (*Table) UInt

func (t *Table) UInt() uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL