executor

package
v0.0.0-...-08a93fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tables = make(map[string]*TableSource)
)

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Exec() *flow.Dataset
	Schema() expression.Schema
}

type LimitExec

type LimitExec struct {
	Src    Executor
	Offset uint64
	Count  uint64
	// contains filtered or unexported fields
}

func (*LimitExec) Exec

func (e *LimitExec) Exec() *flow.Dataset

Next implements the Executor Next interface.

func (*LimitExec) Schema

func (e *LimitExec) Schema() expression.Schema

Schema implements the Executor Schema interface.

type ProjectionExec

type ProjectionExec struct {
	Src Executor
	// contains filtered or unexported fields
}

func (*ProjectionExec) Exec

func (e *ProjectionExec) Exec() *flow.Dataset

Next implements the Executor Next interface.

func (*ProjectionExec) Schema

func (e *ProjectionExec) Schema() expression.Schema

Schema implements the Executor Schema interface.

type SelectTableExec

type SelectTableExec struct {

	// where        *tipb.Expr
	Columns []*model.ColumnInfo
	// contains filtered or unexported fields
}

func (*SelectTableExec) Exec

func (e *SelectTableExec) Exec() *flow.Dataset

Next implements the Executor Next interface.

func (*SelectTableExec) Schema

func (e *SelectTableExec) Schema() expression.Schema

Schema implements the Executor Schema interface.

type Statement

type Statement struct {
	// The InfoSchema cannot change during execution, so we hold a reference to it.
	InfoSchema infoschema.InfoSchema

	Text string
	Plan plan.Plan
	// contains filtered or unexported fields
}

statement implements the ast.Statement interface, it builds a plan.Plan to an ast.Statement.

func (*Statement) Exec

func (a *Statement) Exec(ctx context.Context) (*flow.Dataset, error)

Exec implements the ast.Statement Exec interface. This function builds an Executor from a plan. If the Executor doesn't return result, like the INSERT, UPDATE statements, it executes in this function, if the Executor returns result, execution is done after this function returns, in the returned ast.RecordSet Next method.

func (*Statement) OriginText

func (a *Statement) OriginText() string

type TableColumn

type TableColumn struct {
	ColumnName string
	ColumnType byte
}

type TableSource

type TableSource struct {
	Dataset   *flow.Dataset
	TableInfo *model.TableInfo
}

type UnionScanExec

type UnionScanExec struct {
	Src Executor
	// contains filtered or unexported fields
}

func (*UnionScanExec) Exec

func (e *UnionScanExec) Exec() *flow.Dataset

Next implements the Executor Next interface.

func (*UnionScanExec) Schema

func (e *UnionScanExec) Schema() expression.Schema

Schema implements the Executor Schema interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL