Documentation
¶
Index ¶
- type Aggregator
- type Cube
- func (c *Cube) AddRows(header []string, rows [][]interface{}) error
- func (c Cube) Dice(selector func(c Cube, idx int) bool) Cube
- func (c Cube) Headers() []string
- func (c Cube) IsValid() error
- func (c Cube) RollUp(dimensions []string, fields []string, aggregator Aggregator, ...) Cube
- func (c Cube) Rows() [][]interface{}
- func (c Cube) Slice(dimension string, value interface{}) Cube
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator func(aggregate, value []interface{}) []interface{}
Aggregator is a summarization method to be used by RollUp operator
type Cube ¶
type Cube struct { Dimensions []string `json:"dimensions,omitempty"` Points [][]interface{} `json:"points,omitempty"` Fields []string `json:"fields,omitempty"` Data [][]interface{} `json:"data,omitempty"` }
Cube is an OLAP cube
func (Cube) Dice ¶
Dice operator picks a subcube by choosing a specific values of multiple dimensions.
func (Cube) RollUp ¶
func (c Cube) RollUp(dimensions []string, fields []string, aggregator Aggregator, initialValue []interface{}) Cube
RollUp operator summarize the data along multiple dimensions. Ex: rollup(['year','month'], ['flights'], (sum, value) => [sum[0]+value[0]], [0])
Click to show internal directories.
Click to hide internal directories.