Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BigInteger = bigIntegerType{}
View Source
var ErrInvalidType = errors.New("invalid type")
View Source
var Integer = integerType{}
View Source
var Null = nullType{}
View Source
var String = stringType{}
View Source
var TimestampWithTimezone = timestampWithTimeZoneType{}
TimestampWithTimezone is a timestamp with timezone.
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶ added in v0.3.0
type AggregationExpression ¶ added in v0.3.0
type AggregationExpression interface { Expression // NewBuffer creates a new aggregation buffer and returns it as a Row. NewBuffer() Row // Update updates the given buffer with the given row. Update(buffer, row Row) // Merge merges a partial buffer into a global one. Merge(buffer, partial Row) }
AggregationExpression implements an aggregation expression, where an aggregation buffer is created for each grouping (NewBuffer) and rows in the grouping are fed to the buffer (Update). Multiple buffers can be merged (Merge), making partial aggregations possible. Note that Eval must be called with the final aggregation buffer in order to get the final result.
type Catalog ¶
type Catalog struct { Databases []Database Functions map[string]*FunctionEntry }
func NewCatalog ¶ added in v0.3.0
func NewCatalog() *Catalog
func (Catalog) Function ¶ added in v0.3.0
func (c Catalog) Function(name string) (*FunctionEntry, error)
func (Catalog) RegisterFunction ¶ added in v0.3.0
type Expression ¶
type Expression interface { Resolvable Type() Type Name() string Eval(Row) interface{} TransformUp(func(Expression) Expression) Expression }
type FunctionEntry ¶ added in v0.3.0
type FunctionEntry struct {
// contains filtered or unexported fields
}
func (*FunctionEntry) Build ¶ added in v0.3.0
func (e *FunctionEntry) Build(args ...Expression) (Expression, error)
type Node ¶
type Node interface { Resolvable Transformable Schema() Schema Children() []Node RowIter() (RowIter, error) }
type Resolvable ¶
type Resolvable interface {
Resolved() bool
}
type Transformable ¶
type Transformable interface { TransformUp(func(Node) Node) Node TransformExpressionsUp(func(Expression) Expression) Node }
type Type ¶
type Type interface { Name() string InternalType() reflect.Kind Check(interface{}) bool Convert(interface{}) (interface{}, error) Compare(interface{}, interface{}) int }
var Boolean Type = booleanType{}
var Float Type = floatType{}
type UnresolvedDatabase ¶ added in v0.1.0
type UnresolvedDatabase struct{}
func (*UnresolvedDatabase) Name ¶ added in v0.1.0
func (d *UnresolvedDatabase) Name() string
func (*UnresolvedDatabase) Tables ¶ added in v0.1.0
func (d *UnresolvedDatabase) Tables() map[string]Table
Click to show internal directories.
Click to hide internal directories.