executors

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDatabaseExecutor

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

CreateDatabaseExecutor 创建数据库的执行器

func (*CreateDatabaseExecutor) Execute

func (executor *CreateDatabaseExecutor) Execute() (*Result, error)

Execute 在执行器中根据传递的参数创建数据库

func (*CreateDatabaseExecutor) String

func (executor *CreateDatabaseExecutor) String() string

type CreateTableExecutor

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

CreateTableExecutor 创建表执行器

func (*CreateTableExecutor) Execute

func (executor *CreateTableExecutor) Execute() (*Result, error)

func (*CreateTableExecutor) String

func (executor *CreateTableExecutor) String() string

type DropDatabaseExecutor

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

DropDatabaseExecutor 删除数据库执行器

func (*DropDatabaseExecutor) Execute

func (executor *DropDatabaseExecutor) Execute() (*Result, error)

func (*DropDatabaseExecutor) String

func (executor *DropDatabaseExecutor) String() string

type DropTableExecutor

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

DropTableExecutor 删除表的执行器

func (*DropTableExecutor) Execute

func (executor *DropTableExecutor) Execute() (*Result, error)

func (*DropTableExecutor) String

func (executor *DropTableExecutor) String() string

type ExecutorContext

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

ExecutorContext 执行器上下文

func NewExecutorContext

func NewExecutorContext(ctx context.Context, log *xlog.Log, conf *config.Config, session *sessions.Session) *ExecutorContext

func (*ExecutorContext) SetProgressCallback

func (ctx *ExecutorContext) SetProgressCallback(fn func(pv *sessions.ProgressValues))

type ExecutorTree

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

ExecutorTree 是为了把select查询抽象成树方便执行吧?

func NewExecutorTree

func NewExecutorTree(ctx *ExecutorContext) *ExecutorTree

NewExecutorTree 从执行上下文创建执行树

func (*ExecutorTree) Add

func (tree *ExecutorTree) Add(executor IExecutor)

Add 为当前查询增加一个子查询

func (*ExecutorTree) BuildPipeline

func (tree *ExecutorTree) BuildPipeline() (*processors.Pipeline, error)

BuildPipeline 要把父查询和的结果和子查询的输入连接起来

type FilterExecutor

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

func (*FilterExecutor) Execute

func (executor *FilterExecutor) Execute() (*Result, error)

func (*FilterExecutor) String

func (executor *FilterExecutor) String() string

type IExecutor

type IExecutor interface {

	// String 执行器会有一个名字
	String() string

	// Execute 封装真正执行的逻辑
	Execute() (*Result, error)
}

IExecutor 定义了执行器方法

func ExecutorFactory

func ExecutorFactory(ctx *ExecutorContext, plan planners.IPlan) (IExecutor, error)

func NewCreateDatabaseExecutor

func NewCreateDatabaseExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewCreateTableExecutor

func NewCreateTableExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewDropDatabaseExecutor

func NewDropDatabaseExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewDropTableExecutor

func NewDropTableExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewFilterExecutor

func NewFilterExecutor(ctx *ExecutorContext, filter *planners.FilterPlan) IExecutor

func NewInsertExecutor

func NewInsertExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewLimitExecutor

func NewLimitExecutor(ctx *ExecutorContext, plan *planners.LimitPlan) IExecutor

func NewOrderByExecutor

func NewOrderByExecutor(ctx *ExecutorContext, plan *planners.OrderByPlan) IExecutor

func NewProjectionExecutor

func NewProjectionExecutor(ctx *ExecutorContext, plan *planners.ProjectionPlan) IExecutor

func NewScanExecutor

func NewScanExecutor(ctx *ExecutorContext, plan *planners.ScanPlan) IExecutor

func NewSelectExecutor

func NewSelectExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

创建一个查询执行器

func NewSelectionExecutor

func NewSelectionExecutor(ctx *ExecutorContext, plan *planners.SelectionPlan) IExecutor

func NewShowDatabasesExecutor

func NewShowDatabasesExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewShowTablesExecutor

func NewShowTablesExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

func NewSinkExecutor

func NewSinkExecutor(ctx *ExecutorContext, plan *planners.SinkPlan) IExecutor

func NewTableValuedFunctionExecutor

func NewTableValuedFunctionExecutor(ctx *ExecutorContext, plan *planners.TableValuedFunctionPlan) IExecutor

func NewUseExecutor

func NewUseExecutor(ctx *ExecutorContext, plan planners.IPlan) IExecutor

type InsertExecutor

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

func (*InsertExecutor) Execute

func (executor *InsertExecutor) Execute() (*Result, error)

func (*InsertExecutor) String

func (executor *InsertExecutor) String() string

type LimitExecutor

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

func (*LimitExecutor) Execute

func (executor *LimitExecutor) Execute() (*Result, error)

func (*LimitExecutor) String

func (executor *LimitExecutor) String() string

type OrderByExecutor

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

func (*OrderByExecutor) Execute

func (executor *OrderByExecutor) Execute() (*Result, error)

func (*OrderByExecutor) String

func (executor *OrderByExecutor) String() string

type ProjectionExecutor

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

func (*ProjectionExecutor) Execute

func (executor *ProjectionExecutor) Execute() (*Result, error)

func (*ProjectionExecutor) String

func (executor *ProjectionExecutor) String() string

type Result

Result 表示执行器的执行结果

func NewResult

func NewResult() *Result

func (*Result) Read

func (r *Result) Read() <-chan interface{}

func (*Result) SetInput

func (r *Result) SetInput(in processors.IProcessor)

func (*Result) SetOutput

func (r *Result) SetOutput(out datastreams.IDataBlockOutputStream)

type ScanExecutor

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

func (*ScanExecutor) Execute

func (executor *ScanExecutor) Execute() (*Result, error)

func (*ScanExecutor) String

func (executor *ScanExecutor) String() string

type SelectExecutor

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

查询执行器

func (*SelectExecutor) Execute

func (executor *SelectExecutor) Execute() (*Result, error)

真正开始执行select查询了

func (*SelectExecutor) String

func (executor *SelectExecutor) String() string

type SelectionExecutor

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

func (*SelectionExecutor) Execute

func (executor *SelectionExecutor) Execute() (*Result, error)

func (*SelectionExecutor) String

func (executor *SelectionExecutor) String() string

type SinkExecutor

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

func (*SinkExecutor) Execute

func (executor *SinkExecutor) Execute() (*Result, error)

func (*SinkExecutor) String

func (executor *SinkExecutor) String() string

type TableValuedFunctionExecutor

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

TableValuedFunctionExecutor 函数执行器

func (*TableValuedFunctionExecutor) Execute

func (executor *TableValuedFunctionExecutor) Execute() (*Result, error)

func (*TableValuedFunctionExecutor) String

func (executor *TableValuedFunctionExecutor) String() string

type UseExecutor

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

UseExecutor 切换数据库的执行器

func (*UseExecutor) Execute

func (executor *UseExecutor) Execute() (*Result, error)

Execute 切换数据库

func (*UseExecutor) String

func (executor *UseExecutor) String() string

Jump to

Keyboard shortcuts

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