Documentation ¶
Index ¶
- type Column
- type Table
- func (t Table) Accumulate() *Table
- func (t Table) CreateTableResponse() *simplejson.TableResponse
- func (t Table) DeleteColumn(columns ...string) *Table
- func (t Table) Filter(args simplejson.Args) (filtered *Table)
- func (t Table) GetColumns() (columns []string)
- func (t Table) GetFloatValues(column string) (values []float64, found bool)
- func (t Table) GetStringValues(column string) (values []string, found bool)
- func (t Table) GetTimeValues(column string) (values []time.Time, found bool)
- func (t Table) GetTimestamps() (timestamps []time.Time)
- func (t Table) GetValues(column string) (values []interface{}, found bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { // Name of the column Name string // Values for the column Values interface{} }
Column is used by New to specify the columns to create
type Table ¶
Table is a convenience structure to create tables to response to SimpleJSON Table Queries
func (Table) Accumulate ¶
Accumulate creates a new Table where the number values are accumulated over subsequent rows
func (Table) CreateTableResponse ¶
func (t Table) CreateTableResponse() *simplejson.TableResponse
CreateTableResponse creates a simplejson TableResponse from a Dataset
func (Table) DeleteColumn ¶
DeleteColumn returns a table with the listed columns removed
func (Table) Filter ¶
Filter returns a Dataset meeting the provided query QueryArgs. Currently, it filters based on the args' time Range. only the first time column is taken into consideration.
func (Table) GetColumns ¶
GetColumns returns the dataset's column names
func (Table) GetFloatValues ¶
GetFloatValues returns the float64 values for the specified column name. If the column does not exist, found will be false. Will panic if the data in the provided column is of the wrong type.
func (Table) GetStringValues ¶
GetStringValues returns the string values for the specified column name. If the column does not exist, found will be false Will panic if the data in the provided column is of the wrong type.
func (Table) GetTimeValues ¶
GetTimeValues returns the time values for the specified column name. If the column does not exist, found will be false. Will panic if the data in the provided column is of the wrong type.
func (Table) GetTimestamps ¶
GetTimestamps returns the dataset's timestamps