Documentation
¶
Index ¶
- type AggregatePlan
- type CompositePlan
- type DropWeakPlan
- type GroupPlan
- type HashJoinPlan
- type InsertSelectPlan
- type JoinTable
- type LimitPlan
- type LocalSelectPlan
- type LocalSequencePlan
- type MappingPlan
- type OrderPlan
- type RenamePlan
- type SimpleDeletePlan
- type SimpleInsertPlan
- type SimpleJoinPlan
- type SimpleQueryPlan
- type UpdatePlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatePlan ¶
type AggregatePlan struct { proto.Plan Fields []ast.SelectElement }
type CompositePlan ¶
CompositePlan merges multiple query plan.
func (CompositePlan) Type ¶
func (u CompositePlan) Type() proto.PlanType
type DropWeakPlan ¶
type DropWeakPlan struct { proto.Plan WeakList []*ext.WeakSelectElement }
DropWeakPlan drops weak fields from upstream dataset.
For example:
SELECT id,uid,name FROM student WHERE ... ORDER BY age DESC
will be written:
SELECT id,uid,name,age FROM student WHERE ... ORDER BY age DESC
the `age` field is weak, will be dropped finally.
type GroupPlan ¶
type GroupPlan struct { Plan proto.Plan AggItems map[int]func() merge.Aggregator GroupItems []dataset.OrderByItem OriginColumnCount int }
GroupPlan TODO now only support stmt which group by items equal with order by items, such as `select uid, max(score) from student group by uid order by uid`
type HashJoinPlan ¶
type HashJoinPlan struct { BuildPlan proto.Plan ProbePlan proto.Plan BuildKey string ProbeKey string IsFilterProbeRow bool IsReversedColumn bool Stmt *ast.SelectStatement // contains filtered or unexported fields }
func (*HashJoinPlan) Type ¶
func (h *HashJoinPlan) Type() proto.PlanType
type InsertSelectPlan ¶
type InsertSelectPlan struct { plan.BasePlan Batch map[string]*ast.InsertSelectStatement }
func NewInsertSelectPlan ¶
func NewInsertSelectPlan() *InsertSelectPlan
func (*InsertSelectPlan) Type ¶
func (sp *InsertSelectPlan) Type() proto.PlanType
type LocalSelectPlan ¶
type LocalSelectPlan struct { plan.BasePlan Stmt *ast.SelectStatement Result []proto.Value ColumnList []string }
func (*LocalSelectPlan) Type ¶
func (s *LocalSelectPlan) Type() proto.PlanType
type LocalSequencePlan ¶
type LocalSequencePlan struct { plan.BasePlan Stmt *ast.SelectStatement VTs []*rule.VTable ColumnList []string }
func (*LocalSequencePlan) Type ¶
func (s *LocalSequencePlan) Type() proto.PlanType
type MappingPlan ¶
type MappingPlan struct { proto.Plan Fields []ast.SelectElement }
MappingPlan represents a query plan which will mapping column values.
type OrderPlan ¶
type OrderPlan struct { ParentPlan proto.Plan OrderByItems []dataset.OrderByItem }
type RenamePlan ¶
type SimpleDeletePlan ¶
SimpleDeletePlan represents a simple delete plan for sharding table.
func NewSimpleDeletePlan ¶
func NewSimpleDeletePlan(stmt *ast.DeleteStatement) *SimpleDeletePlan
NewSimpleDeletePlan creates a simple delete plan.
func (*SimpleDeletePlan) SetShards ¶
func (s *SimpleDeletePlan) SetShards(shards rule.DatabaseTables)
func (*SimpleDeletePlan) Type ¶
func (s *SimpleDeletePlan) Type() proto.PlanType
type SimpleInsertPlan ¶
func NewSimpleInsertPlan ¶
func NewSimpleInsertPlan() *SimpleInsertPlan
func (*SimpleInsertPlan) Put ¶
func (sp *SimpleInsertPlan) Put(db string, stmt *ast.InsertStatement)
func (*SimpleInsertPlan) Type ¶
func (sp *SimpleInsertPlan) Type() proto.PlanType
type SimpleJoinPlan ¶
type SimpleJoinPlan struct { plan.BasePlan Database string Left *JoinTable Join *ast.JoinNode Right *JoinTable Stmt *ast.SelectStatement }
func (*SimpleJoinPlan) Type ¶
func (s *SimpleJoinPlan) Type() proto.PlanType
type SimpleQueryPlan ¶
type SimpleQueryPlan struct { plan.BasePlan Database string Tables []string Stmt *ast.SelectStatement }
func (*SimpleQueryPlan) Type ¶
func (s *SimpleQueryPlan) Type() proto.PlanType
type UpdatePlan ¶
UpdatePlan represents a plan to execute sharding-update.
func NewUpdatePlan ¶
func NewUpdatePlan(stmt *ast.UpdateStatement) *UpdatePlan
NewUpdatePlan creates a sharding-update plan.
func (*UpdatePlan) SetShards ¶
func (up *UpdatePlan) SetShards(shards rule.DatabaseTables)
func (*UpdatePlan) Type ¶
func (up *UpdatePlan) Type() proto.PlanType
Click to show internal directories.
Click to hide internal directories.