objects

package
v0.151.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemaMonoType = semantic.NewObjectType([]semantic.PropertyType{
		{
			Key:   []byte("label"),
			Value: semantic.BasicString,
		},
		{
			Key:   []byte("grouped"),
			Value: semantic.BasicBool,
		},
		{
			Key:   []byte("type"),
			Value: semantic.BasicString,
		},
	})
	TableMonoType = semantic.NewObjectType([]semantic.PropertyType{{
		Key:   []byte("schema"),
		Value: semantic.NewArrayType(SchemaMonoType),
	}})
)

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.BufferedTable
	// 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, error)

func (*Table) Array

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

func (*Table) Bool

func (t *Table) Bool() bool

func (*Table) Bytes added in v0.40.0

func (t *Table) Bytes() []byte

func (*Table) Dict added in v0.96.0

func (t *Table) Dict() values.Dictionary

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) 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) Table added in v0.34.1

func (t *Table) Table() flux.Table

Table returns a copy of the Table that can be called with Do. Either Do or Done must be called on the returned Table.

func (*Table) Time

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

func (*Table) Type

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

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