plan

package
v0.0.0-...-b4c1251 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EID_NODE = iota
	VALUE_NODE
	LIST_NODE
	OTHER_NODE
)
View Source
const (
	MasterComment = "/*master*/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	//stmt sqlparser.Statement
	Rule   *router.Rule
	Schema *schema.Schema

	RouteTableIndexList []int
	RouteNodeIndexList  []int
	RewrittenSqlList    map[string][]string

	FromSlave bool

	KeyIndex int
	Rows     map[int]sqlparser.Values //insert 条件

	Criteria sqlparser.SQLNode
}

func BuildPlan

func BuildPlan(statement sqlparser.Statement, schema *schema.Schema) (*Plan, error)

func (*Plan) GetIRKeyIndex

func (plan *Plan) GetIRKeyIndex(cols sqlparser.Columns) error

GetIRKeyIndex find shard key index in insert or replace SQL plan.Rule cols must not nil

func (*Plan) TIndexListToNIndexList

func (plan *Plan) TIndexListToNIndexList(tableIndexList []int) []int

Jump to

Keyboard shortcuts

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