octosql: github.com/cube2222/octosql/execution/aggregates Index | Files | Directories

package aggregates

import "github.com/cube2222/octosql/execution/aggregates"

Index

Package Files

avg.go count.go distinct.go first.go last.go max.go min.go sum.go table.go

Variables

var AggregateTable = map[string]execution.AggregatePrototype{
    NewAverage().String():              func() execution.Aggregate { return NewAverage() },
    NewDistinct(NewAverage()).String(): func() execution.Aggregate { return NewDistinct(NewAverage()) },
    NewCount().String():                func() execution.Aggregate { return NewCount() },
    NewDistinct(NewCount()).String():   func() execution.Aggregate { return NewDistinct(NewCount()) },
    NewFirst().String():                func() execution.Aggregate { return NewFirst() },
    NewLast().String():                 func() execution.Aggregate { return NewLast() },
    NewMax().String():                  func() execution.Aggregate { return NewMax() },
    NewMin().String():                  func() execution.Aggregate { return NewMin() },
    NewSum().String():                  func() execution.Aggregate { return NewSum() },
    NewDistinct(NewSum()).String():     func() execution.Aggregate { return NewDistinct(NewSum()) },
}

type Average Uses

type Average struct {
    // contains filtered or unexported fields
}

func NewAverage Uses

func NewAverage() *Average

func (*Average) AddRecord Uses

func (agg *Average) AddRecord(key octosql.Value, value octosql.Value) error

func (*Average) Document Uses

func (agg *Average) Document() docs.Documentation

func (*Average) GetAggregated Uses

func (agg *Average) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Average) String Uses

func (agg *Average) String() string

type Count Uses

type Count struct {
    // contains filtered or unexported fields
}

func NewCount Uses

func NewCount() *Count

func (*Count) AddRecord Uses

func (agg *Count) AddRecord(key octosql.Value, value octosql.Value) error

func (*Count) Document Uses

func (agg *Count) Document() docs.Documentation

func (*Count) GetAggregated Uses

func (agg *Count) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Count) String Uses

func (agg *Count) String() string

type Distinct Uses

type Distinct struct {
    // contains filtered or unexported fields
}

func NewDistinct Uses

func NewDistinct(underlying execution.Aggregate) *Distinct

func (*Distinct) AddRecord Uses

func (agg *Distinct) AddRecord(key octosql.Value, value octosql.Value) error

func (*Distinct) Document Uses

func (agg *Distinct) Document() docs.Documentation

func (*Distinct) GetAggregated Uses

func (agg *Distinct) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Distinct) String Uses

func (agg *Distinct) String() string

type First Uses

type First struct {
    // contains filtered or unexported fields
}

func NewFirst Uses

func NewFirst() *First

func (*First) AddRecord Uses

func (agg *First) AddRecord(key octosql.Value, value octosql.Value) error

func (*First) Document Uses

func (agg *First) Document() docs.Documentation

func (*First) GetAggregated Uses

func (agg *First) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*First) String Uses

func (agg *First) String() string

type Last Uses

type Last struct {
    // contains filtered or unexported fields
}

func NewLast Uses

func NewLast() *Last

func (*Last) AddRecord Uses

func (agg *Last) AddRecord(key octosql.Value, value octosql.Value) error

func (*Last) Document Uses

func (agg *Last) Document() docs.Documentation

func (*Last) GetAggregated Uses

func (agg *Last) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Last) String Uses

func (agg *Last) String() string

type Max Uses

type Max struct {
    // contains filtered or unexported fields
}

func NewMax Uses

func NewMax() *Max

func (*Max) AddRecord Uses

func (agg *Max) AddRecord(key octosql.Value, value octosql.Value) error

func (*Max) Document Uses

func (agg *Max) Document() docs.Documentation

func (*Max) GetAggregated Uses

func (agg *Max) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Max) String Uses

func (agg *Max) String() string

type Min Uses

type Min struct {
    // contains filtered or unexported fields
}

func NewMin Uses

func NewMin() *Min

func (*Min) AddRecord Uses

func (agg *Min) AddRecord(key octosql.Value, value octosql.Value) error

func (*Min) Document Uses

func (agg *Min) Document() docs.Documentation

func (*Min) GetAggregated Uses

func (agg *Min) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Min) String Uses

func (agg *Min) String() string

type Sum Uses

type Sum struct {
    // contains filtered or unexported fields
}

func NewSum Uses

func NewSum() *Sum

func (*Sum) AddRecord Uses

func (agg *Sum) AddRecord(key octosql.Value, value octosql.Value) error

func (*Sum) Document Uses

func (agg *Sum) Document() docs.Documentation

func (*Sum) GetAggregated Uses

func (agg *Sum) GetAggregated(key octosql.Value) (octosql.Value, error)

func (*Sum) String Uses

func (agg *Sum) String() string

Directories

PathSynopsis
docgen

Package aggregates imports 6 packages (graph) and is imported by 2 packages. Updated 2019-12-09. Refresh now. Tools for package owners.