plan

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const FuncColumns = "FuncColumns"

Variables

This section is empty.

Functions

This section is empty.

Types

type DeletePlan added in v0.2.0

type DeletePlan struct {
	Database string
	Tables   []string
	Stmt     *ast.DeleteStmt
	Args     []interface{}
	Executor proto.DBGroupExecutor
}

func (*DeletePlan) Execute added in v0.2.0

func (p *DeletePlan) Execute(ctx context.Context, hints ...*ast.TableOptimizerHint) (proto.Result, uint16, error)

type InsertPlan

type InsertPlan struct {
	Database string
	Table    string
	Columns  []string
	Stmt     *ast.InsertStmt
	Args     []interface{}
	Executor proto.DBGroupExecutor
}

func (*InsertPlan) Execute

func (p *InsertPlan) Execute(ctx context.Context, hints ...*ast.TableOptimizerHint) (proto.Result, uint16, error)

type Limit

type Limit struct {
	ArgsWithoutLimit []interface{}
	Offset           int64
	Count            int64
}

type MultiDeletePlan added in v0.2.0

type MultiDeletePlan struct {
	Stmt  *ast.DeleteStmt
	Plans []*DeletePlan
}

func (*MultiDeletePlan) Execute added in v0.2.0

func (p *MultiDeletePlan) Execute(ctx context.Context, _ ...*ast.TableOptimizerHint) (result proto.Result, warns uint16, err error)

type MultiUpdatePlan added in v0.2.0

type MultiUpdatePlan struct {
	Stmt  *ast.UpdateStmt
	Plans []*UpdatePlan
}

func (*MultiUpdatePlan) Execute added in v0.2.0

func (p *MultiUpdatePlan) Execute(ctx context.Context, _ ...*ast.TableOptimizerHint) (result proto.Result, warns uint16, err error)

type OrderByCell

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

type OrderByCells

type OrderByCells []*OrderByCell

func (OrderByCells) Len

func (c OrderByCells) Len() int

func (OrderByCells) Less

func (c OrderByCells) Less(i, j int) bool

func (OrderByCells) Swap

func (c OrderByCells) Swap(i, j int)

type OrderField added in v0.2.0

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

type QueryOnMultiDBPlan

type QueryOnMultiDBPlan struct {
	Stmt  *ast.SelectStmt
	Plans []*QueryOnSingleDBPlan
}

func (*QueryOnMultiDBPlan) Execute

type QueryOnSingleDBPlan

type QueryOnSingleDBPlan struct {
	Database string
	Tables   []string
	PK       string
	Stmt     *ast.SelectStmt
	Limit    *Limit
	Args     []interface{}
	Executor proto.DBGroupExecutor
}

func (*QueryOnSingleDBPlan) Execute

type ResultWithErr

type ResultWithErr struct {
	Database string
	Result   proto.Result
	Warning  uint16
	Error    error
}

type ResultWithErrs

type ResultWithErrs []*ResultWithErr

func (ResultWithErrs) Len

func (r ResultWithErrs) Len() int

func (ResultWithErrs) Less

func (r ResultWithErrs) Less(i, j int) bool

func (ResultWithErrs) Swap

func (r ResultWithErrs) Swap(i, j int)

type UpdatePlan added in v0.2.0

type UpdatePlan struct {
	Database string
	Tables   []string
	Stmt     *ast.UpdateStmt
	Args     []interface{}
	Executor proto.DBGroupExecutor
}

func (*UpdatePlan) Execute added in v0.2.0

func (p *UpdatePlan) Execute(ctx context.Context, hints ...*ast.TableOptimizerHint) (proto.Result, uint16, error)

Jump to

Keyboard shortcuts

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