octosql: github.com/cube2222/octosql/logical Index | Files

package logical

import "github.com/cube2222/octosql/logical"

Index

Package Files

distinct.go filter.go function.go group_by.go innerjoin.go interval.go leftjoin.go limit.go logic.go logical.go map.go offset.go order_by.go relation.go requalifier.go tvf.go union_all.go union_distinct.go utils.go

Variables

var AggregateFunctions = map[Aggregate]struct{}{
    Avg:           struct{}{},
    AvgDistinct:   struct{}{},
    Count:         struct{}{},
    CountDistinct: struct{}{},
    First:         struct{}{},
    Last:          struct{}{},
    Max:           struct{}{},
    Min:           struct{}{},
    Sum:           struct{}{},
    SumDistinct:   struct{}{},
}

func EqualExpressions Uses

func EqualExpressions(expr1, expr2 Expression) error

func EqualFormula Uses

func EqualFormula(expr1, expr2 Formula) error

func EqualNodes Uses

func EqualNodes(node1, node2 Node) error

func EqualTableValuedFunctionArgumentValue Uses

func EqualTableValuedFunctionArgumentValue(value1 TableValuedFunctionArgumentValue, value2 TableValuedFunctionArgumentValue) error

type Aggregate Uses

type Aggregate string
const (
    Avg           Aggregate = "avg"
    AvgDistinct   Aggregate = "avg_distinct"
    Count         Aggregate = "count"
    CountDistinct Aggregate = "count_distinct"
    First         Aggregate = "first"
    Last          Aggregate = "last"
    Max           Aggregate = "max"
    Min           Aggregate = "min"
    Sum           Aggregate = "sum"
    SumDistinct   Aggregate = "sum_distinct"
)

type AliasedExpression Uses

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

func (*AliasedExpression) Name Uses

func (alExpr *AliasedExpression) Name() octosql.VariableName

func (*AliasedExpression) Physical Uses

func (alExpr *AliasedExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*AliasedExpression) PhysicalNamed Uses

func (alExpr *AliasedExpression) PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)

type BooleanConstant Uses

type BooleanConstant struct {
    Value bool
}

func NewBooleanConstant Uses

func NewBooleanConstant(value bool) *BooleanConstant

func (*BooleanConstant) Physical Uses

func (f *BooleanConstant) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

type Constant Uses

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

func NewConstant Uses

func NewConstant(value interface{}) *Constant

func (*Constant) Physical Uses

func (v *Constant) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type DataSource Uses

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

func NewDataSource Uses

func NewDataSource(name string, alias string) *DataSource

func (*DataSource) Physical Uses

func (ds *DataSource) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Distinct Uses

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

func NewDistinct Uses

func NewDistinct(child Node) *Distinct

func (*Distinct) Physical Uses

func (node *Distinct) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Expression Uses

type Expression interface {
    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)
}

type Filter Uses

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

func NewFilter Uses

func NewFilter(formula Formula, child Node) *Filter

func (*Filter) Physical Uses

func (node *Filter) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Formula Uses

type Formula interface {
    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)
}

type FunctionExpression Uses

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

func NewFunctionExpression Uses

func NewFunctionExpression(name string, args []Expression) *FunctionExpression

func (*FunctionExpression) Physical Uses

func (fe *FunctionExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type GroupBy Uses

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

func NewGroupBy Uses

func NewGroupBy(source Node, key []Expression, fields []octosql.VariableName, aggregates []Aggregate, as []octosql.VariableName) *GroupBy

func (*GroupBy) Physical Uses

func (node *GroupBy) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type InfixOperator Uses

type InfixOperator struct {
    Left     Formula
    Operator string
    Right    Formula
}

func NewInfixOperator Uses

func NewInfixOperator(left Formula, right Formula, operator string) *InfixOperator

func (*InfixOperator) Physical Uses

func (f *InfixOperator) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

type InnerJoin Uses

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

func NewInnerJoin Uses

func NewInnerJoin(source Node, joined Node) *InnerJoin

func (*InnerJoin) Physical Uses

func (node *InnerJoin) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Interval Uses

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

func NewInterval Uses

func NewInterval(count Expression, unit Expression) *Interval

func (*Interval) Physical Uses

func (v *Interval) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type LeftJoin Uses

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

func NewLeftJoin Uses

func NewLeftJoin(source Node, joined Node) *LeftJoin

func (*LeftJoin) Physical Uses

func (node *LeftJoin) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Limit Uses

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

func (*Limit) Physical Uses

func (node *Limit) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type LogicExpression Uses

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

func NewLogicExpression Uses

func NewLogicExpression(formula Formula) *LogicExpression

func (*LogicExpression) Physical Uses

func (le *LogicExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type Map Uses

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

func NewMap Uses

func NewMap(expressions []NamedExpression, child Node, keep bool) *Map

func (*Map) Physical Uses

func (node *Map) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type NamedExpression Uses

type NamedExpression interface {
    Expression
    Name() octosql.VariableName
    PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)
}

func NewAliasedExpression Uses

func NewAliasedExpression(name octosql.VariableName, expr Expression) NamedExpression

type Node Uses

type Node interface {
    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)
}

func NewLimit Uses

func NewLimit(data Node, expr Expression) Node

func NewOffset Uses

func NewOffset(data Node, expr Expression) Node

type NodeExpression Uses

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

func NewNodeExpression Uses

func NewNodeExpression(node Node) *NodeExpression

func (*NodeExpression) Physical Uses

func (ne *NodeExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type Offset Uses

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

func (*Offset) Physical Uses

func (node *Offset) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type OrderBy Uses

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

func NewOrderBy Uses

func NewOrderBy(expressions []Expression, directions []OrderDirection, source Node) *OrderBy

func (*OrderBy) Physical Uses

func (node *OrderBy) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type OrderDirection Uses

type OrderDirection string

type PhysicalPlanCreator Uses

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

func NewPhysicalPlanCreator Uses

func NewPhysicalPlanCreator(repo *physical.DataSourceRepository) *PhysicalPlanCreator

func (*PhysicalPlanCreator) GetVariableName Uses

func (creator *PhysicalPlanCreator) GetVariableName() (out octosql.VariableName)

type Predicate Uses

type Predicate struct {
    Left     Expression
    Relation Relation
    Right    Expression
}

func NewPredicate Uses

func NewPredicate(left Expression, relation Relation, right Expression) *Predicate

func (*Predicate) Physical Uses

func (f *Predicate) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

type PrefixOperator Uses

type PrefixOperator struct {
    Child    Formula
    Operator string
}

func NewPrefixOperator Uses

func NewPrefixOperator(child Formula, operator string) *PrefixOperator

func (*PrefixOperator) Physical Uses

func (f *PrefixOperator) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

type Relation Uses

type Relation string
const (
    Equal        Relation = "="
    NotEqual     Relation = "!="
    MoreThan     Relation = ">"
    LessThan     Relation = "<"
    Like         Relation = "like"
    In           Relation = "in"
    NotIn        Relation = "not in"
    GreaterEqual Relation = ">="
    LessEqual    Relation = "<="
    Regexp       Relation = "regexp"
)

func NewRelation Uses

func NewRelation(relation string) Relation

func (Relation) Physical Uses

func (rel Relation) Physical(ctx context.Context) (physical.Relation, error)

type Requalifier Uses

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

func NewRequalifier Uses

func NewRequalifier(qualifier string, child Node) *Requalifier

func (*Requalifier) Physical Uses

func (node *Requalifier) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type TableValuedFunction Uses

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

func NewTableValuedFunction Uses

func NewTableValuedFunction(name string, arguments map[octosql.VariableName]TableValuedFunctionArgumentValue) *TableValuedFunction

func (*TableValuedFunction) Physical Uses

func (node *TableValuedFunction) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type TableValuedFunctionArgumentValue Uses

type TableValuedFunctionArgumentValue interface {
    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.TableValuedFunctionArgumentValue, octosql.Variables, error)
    // contains filtered or unexported methods
}

type TableValuedFunctionArgumentValueDescriptor Uses

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

func NewTableValuedFunctionArgumentValueDescriptor Uses

func NewTableValuedFunctionArgumentValueDescriptor(descriptor octosql.VariableName) *TableValuedFunctionArgumentValueDescriptor

func (*TableValuedFunctionArgumentValueDescriptor) Physical Uses

func (arg *TableValuedFunctionArgumentValueDescriptor) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

type TableValuedFunctionArgumentValueExpression Uses

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

func NewTableValuedFunctionArgumentValueExpression Uses

func NewTableValuedFunctionArgumentValueExpression(expression Expression) *TableValuedFunctionArgumentValueExpression

func (*TableValuedFunctionArgumentValueExpression) Physical Uses

func (arg *TableValuedFunctionArgumentValueExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

type TableValuedFunctionArgumentValueTable Uses

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

func NewTableValuedFunctionArgumentValueTable Uses

func NewTableValuedFunctionArgumentValueTable(source Node) *TableValuedFunctionArgumentValueTable

func (*TableValuedFunctionArgumentValueTable) Physical Uses

func (arg *TableValuedFunctionArgumentValueTable) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

type Tuple Uses

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

func NewTuple Uses

func NewTuple(expressions []Expression) *Tuple

func (*Tuple) Physical Uses

func (tup *Tuple) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

type UnionAll Uses

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

func NewUnionAll Uses

func NewUnionAll(first, second Node) *UnionAll

func (*UnionAll) Physical Uses

func (node *UnionAll) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type UnionDistinct Uses

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

func NewUnionDistinct Uses

func NewUnionDistinct(first, second Node) *UnionDistinct

func (*UnionDistinct) Physical Uses

func (node *UnionDistinct) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Node, octosql.Variables, error)

type Variable Uses

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

func NewVariable Uses

func NewVariable(name octosql.VariableName) *Variable

func (*Variable) Name Uses

func (v *Variable) Name() octosql.VariableName

func (*Variable) Physical Uses

func (v *Variable) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*Variable) PhysicalNamed Uses

func (v *Variable) PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)

Package logical imports 8 packages (graph) and is imported by 2 packages. Updated 2020-01-26. Refresh now. Tools for package owners.