plan

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteOnMultiDBPlan added in v0.1.1

type DeleteOnMultiDBPlan struct {
	Stmt  *ast.DeleteStmt
	Plans []*DeleteOnSingleDBPlan
}

func (*DeleteOnMultiDBPlan) Execute added in v0.1.1

type DeleteOnSingleDBPlan added in v0.1.1

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

func (*DeleteOnSingleDBPlan) Execute added in v0.1.1

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) (proto.Result, uint16, error)

type Limit

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

type OrderByCell

type OrderByCell struct {
	Index int
	Val   interface{}
	Next  bool
	Row   proto.Row
}

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 QueryOnMultiDBPlan

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

func (*QueryOnMultiDBPlan) Execute

type QueryOnSingleDBPlan

type QueryOnSingleDBPlan struct {
	Database string
	Tables   []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 UpdateOnMultiDBPlan added in v0.1.2

type UpdateOnMultiDBPlan struct {
	Stmt  *ast.UpdateStmt
	Plans []*UpdateOnSingleDBPlan
}

func (*UpdateOnMultiDBPlan) Execute added in v0.1.2

type UpdateOnSingleDBPlan added in v0.1.2

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

func (*UpdateOnSingleDBPlan) Execute added in v0.1.2

Jump to

Keyboard shortcuts

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