Documentation ¶
Overview ¶
explain explain statement
Index ¶
- Constants
- func GetDeleteTableLableValue(deleteCtxs []*plan.DeleteTableCtx, options *ExplainOptions) []string
- func GetExprsLabelValue(exprList []*plan.Expr, options *ExplainOptions) ([]string, error)
- func GetTableColsLableValue(cols []*plan.ColDef, options *ExplainOptions) []string
- func GetUpdateTableColsLableValue(cols []*plan.ColDef, db string, tname string, options *ExplainOptions) []string
- func GetUpdateTableLableValue(updateCtxs []*plan.UpdateCtx, options *ExplainOptions) []string
- func GettOrderByLabelValue(orderbyList []*plan.OrderBySpec, options *ExplainOptions) ([]string, error)
- func PreOrderPlan(node *plan.Node, Nodes []*plan.Node, graphData *GraphData, ...) error
- type AnalyzeInfoDescribeImpl
- type Cost
- type CostDescribeImpl
- type Edge
- type ExplainData
- type ExplainDataBuffer
- type ExplainFormat
- type ExplainOptions
- type ExplainQuery
- type ExplainQueryImpl
- type ExprListDescribeImpl
- type FormatSettings
- type Global
- type GraphData
- type Label
- type MarshalNode
- type MarshalNodeImpl
- func (m MarshalNodeImpl) GetCost() Cost
- func (m MarshalNodeImpl) GetNodeLabels(options *ExplainOptions) ([]Label, error)
- func (m MarshalNodeImpl) GetNodeName() (string, error)
- func (m MarshalNodeImpl) GetNodeTitle(options *ExplainOptions) (string, error)
- func (m MarshalNodeImpl) GetStatistics(options *ExplainOptions) Statistics
- func (m MarshalNodeImpl) GetTotalStats() TotalStats
- type Node
- type NodeDescribe
- type NodeDescribeImpl
- func (ndesc *NodeDescribeImpl) GetActualAnalyzeInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetAggregationInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetExtraInfo(options *ExplainOptions) ([]string, error)
- func (ndesc *NodeDescribeImpl) GetFilterConditionInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetGroupByInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetJoinConditionInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetJoinTypeInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetNodeBasicInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetOrderByInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetProjectListInfo(options *ExplainOptions) (string, error)
- func (ndesc *NodeDescribeImpl) GetTableDef(options *ExplainOptions) (string, error)
- type NodeElemDescribe
- type OrderByDescribeImpl
- type RowsetDataDescribeImpl
- type StatisticValue
- type Statistics
- type Stats
- type Step
- type TotalStats
- type UpdateCtxsDescribeImpl
- type WinSpecDescribeImpl
Constants ¶
View Source
const ExternalScan = "External Scan"
View Source
const InputRows = "Input Rows"
View Source
const InputSize = "Input Size"
View Source
const TableScan = "Table Scan"
Variables ¶
This section is empty.
Functions ¶
func GetDeleteTableLableValue ¶ added in v0.6.0
func GetDeleteTableLableValue(deleteCtxs []*plan.DeleteTableCtx, options *ExplainOptions) []string
func GetExprsLabelValue ¶ added in v0.6.0
func GetExprsLabelValue(exprList []*plan.Expr, options *ExplainOptions) ([]string, error)
func GetTableColsLableValue ¶ added in v0.6.0
func GetTableColsLableValue(cols []*plan.ColDef, options *ExplainOptions) []string
func GetUpdateTableColsLableValue ¶ added in v0.6.0
func GetUpdateTableLableValue ¶ added in v0.6.0
func GetUpdateTableLableValue(updateCtxs []*plan.UpdateCtx, options *ExplainOptions) []string
func GettOrderByLabelValue ¶ added in v0.6.0
func GettOrderByLabelValue(orderbyList []*plan.OrderBySpec, options *ExplainOptions) ([]string, error)
func PreOrderPlan ¶ added in v0.6.0
Types ¶
type AnalyzeInfoDescribeImpl ¶ added in v0.6.0
type AnalyzeInfoDescribeImpl struct {
AnalyzeInfo *plan.AnalyzeInfo
}
func NewAnalyzeInfoDescribeImpl ¶ added in v0.6.0
func NewAnalyzeInfoDescribeImpl(analyze *plan.AnalyzeInfo) *AnalyzeInfoDescribeImpl
func (AnalyzeInfoDescribeImpl) GetDescription ¶ added in v0.6.0
func (a AnalyzeInfoDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type CostDescribeImpl ¶
func (*CostDescribeImpl) GetDescription ¶
func (c *CostDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type ExplainData ¶ added in v0.6.0
type ExplainData struct { Steps []Step `json:"steps"` Code uint16 `json:"code"` Message string `json:"message"` Success bool `json:"success"` Uuid string `json:"uuid"` }
func NewExplainData ¶ added in v0.6.0
func NewExplainData(uuid uuid.UUID) *ExplainData
func NewExplainDataFail ¶ added in v0.6.0
func NewExplainDataFail(uuid uuid.UUID, code uint16, msg string) *ExplainData
func (*ExplainData) StatisticsRead ¶ added in v0.6.0
func (d *ExplainData) StatisticsRead() (rows int64, size int64)
StatisticsRead statistics read rows, size in ExplainData
type ExplainDataBuffer ¶
func NewExplainDataBuffer ¶
func NewExplainDataBuffer() *ExplainDataBuffer
func (*ExplainDataBuffer) AppendCurrentLine ¶
func (buf *ExplainDataBuffer) AppendCurrentLine(temp string)
func (*ExplainDataBuffer) PushNewLine ¶
func (buf *ExplainDataBuffer) PushNewLine(line string, isNewNode bool, level int)
type ExplainFormat ¶
type ExplainFormat int32
const ( EXPLAIN_FORMAT_TEXT ExplainFormat = 0 EXPLAIN_FORMAT_XML ExplainFormat = 1 EXPLAIN_FORMAT_JSON ExplainFormat = 2 EXPLAIN_FORMAT_DOT ExplainFormat = 3 )
type ExplainOptions ¶
type ExplainOptions struct { Verbose bool Analyze bool Format ExplainFormat }
func NewExplainDefaultOptions ¶
func NewExplainDefaultOptions() *ExplainOptions
type ExplainQuery ¶
type ExplainQuery interface {
ExplainPlan(buffer *ExplainDataBuffer, options *ExplainOptions) error
}
type ExplainQueryImpl ¶
func NewExplainQueryImpl ¶
func NewExplainQueryImpl(query *plan.Query) *ExplainQueryImpl
func (*ExplainQueryImpl) BuildJsonPlan ¶ added in v0.6.0
func (e *ExplainQueryImpl) BuildJsonPlan(uuid uuid.UUID, options *ExplainOptions) *ExplainData
func (*ExplainQueryImpl) ExplainPlan ¶
func (e *ExplainQueryImpl) ExplainPlan(buffer *ExplainDataBuffer, options *ExplainOptions) error
type ExprListDescribeImpl ¶
type ExprListDescribeImpl struct {
ExprList []*plan.Expr // ProjectList,OnList,FilterList,GroupBy,GroupingSet and so on
}
func NewExprListDescribeImpl ¶
func NewExprListDescribeImpl(ExprList []*plan.Expr) *ExprListDescribeImpl
func (*ExprListDescribeImpl) GetDescription ¶
func (e *ExprListDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type FormatSettings ¶
type FormatSettings struct {
// contains filtered or unexported fields
}
type Global ¶ added in v0.6.0
type Global struct { Statistics Statistics `json:"statistics"` TotalStats TotalStats `json:"totalStats"` }
type GraphData ¶ added in v0.6.0
type GraphData struct { Nodes []Node `json:"nodes"` Edges []Edge `json:"edges"` Labels []Label `json:"labels"` Global Global `json:"global"` }
func NewGraphData ¶ added in v0.6.0
func NewGraphData() *GraphData
type Label ¶ added in v0.6.0
type Label struct { Name string `json:"name"` Value interface{} `json:"value"` }
type MarshalNode ¶ added in v0.6.0
type MarshalNode interface { GetNodeName() (string, error) GetNodeTitle(options *ExplainOptions) (string, error) GetNodeLabels(options *ExplainOptions) ([]Label, error) GetStatistics(options *ExplainOptions) Statistics GetCost() Cost GetTotalStats() TotalStats }
type MarshalNodeImpl ¶ added in v0.6.0
type MarshalNodeImpl struct {
// contains filtered or unexported fields
}
func NewMarshalNodeImpl ¶ added in v0.6.0
func NewMarshalNodeImpl(node *plan.Node) *MarshalNodeImpl
func (MarshalNodeImpl) GetCost ¶ added in v0.6.0
func (m MarshalNodeImpl) GetCost() Cost
func (MarshalNodeImpl) GetNodeLabels ¶ added in v0.6.0
func (m MarshalNodeImpl) GetNodeLabels(options *ExplainOptions) ([]Label, error)
func (MarshalNodeImpl) GetNodeName ¶ added in v0.6.0
func (m MarshalNodeImpl) GetNodeName() (string, error)
func (MarshalNodeImpl) GetNodeTitle ¶ added in v0.6.0
func (m MarshalNodeImpl) GetNodeTitle(options *ExplainOptions) (string, error)
func (MarshalNodeImpl) GetStatistics ¶ added in v0.6.0
func (m MarshalNodeImpl) GetStatistics(options *ExplainOptions) Statistics
func (MarshalNodeImpl) GetTotalStats ¶ added in v0.6.0
func (m MarshalNodeImpl) GetTotalStats() TotalStats
type Node ¶ added in v0.6.0
type Node struct { NodeId string `json:"id"` Name string `json:"name"` Title string `json:"title"` Labels []Label `json:"labels"` Statistics Statistics `json:"statistics"` Cost Cost `json:"cost"` TotalStats TotalStats `json:"totalStats"` }
func ConvertNode ¶ added in v0.6.0
func ConvertNode(node *plan.Node, options *ExplainOptions) (*Node, error)
type NodeDescribe ¶
type NodeDescribe interface { GetNodeBasicInfo(options *ExplainOptions) (string, error) GetExtraInfo(options *ExplainOptions) ([]string, error) GetProjectListInfo(options *ExplainOptions) (string, error) GetJoinTypeInfo(options *ExplainOptions) (string, error) GetJoinConditionInfo(options *ExplainOptions) (string, error) GetFilterConditionInfo(options *ExplainOptions) (string, error) GetOrderByInfo(options *ExplainOptions) (string, error) GetGroupByInfo(options *ExplainOptions) (string, error) GetTableDef(options *ExplainOptions) (string, error) GetActualAnalyzeInfo(options *ExplainOptions) (string, error) }
type NodeDescribeImpl ¶
func NewNodeDescriptionImpl ¶
func NewNodeDescriptionImpl(node *plan.Node) *NodeDescribeImpl
func (*NodeDescribeImpl) GetActualAnalyzeInfo ¶ added in v0.6.0
func (ndesc *NodeDescribeImpl) GetActualAnalyzeInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetAggregationInfo ¶
func (ndesc *NodeDescribeImpl) GetAggregationInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetExtraInfo ¶
func (ndesc *NodeDescribeImpl) GetExtraInfo(options *ExplainOptions) ([]string, error)
func (*NodeDescribeImpl) GetFilterConditionInfo ¶
func (ndesc *NodeDescribeImpl) GetFilterConditionInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetGroupByInfo ¶
func (ndesc *NodeDescribeImpl) GetGroupByInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetJoinConditionInfo ¶
func (ndesc *NodeDescribeImpl) GetJoinConditionInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetJoinTypeInfo ¶
func (ndesc *NodeDescribeImpl) GetJoinTypeInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetNodeBasicInfo ¶
func (ndesc *NodeDescribeImpl) GetNodeBasicInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetOrderByInfo ¶
func (ndesc *NodeDescribeImpl) GetOrderByInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetProjectListInfo ¶
func (ndesc *NodeDescribeImpl) GetProjectListInfo(options *ExplainOptions) (string, error)
func (*NodeDescribeImpl) GetTableDef ¶
func (ndesc *NodeDescribeImpl) GetTableDef(options *ExplainOptions) (string, error)
type NodeElemDescribe ¶
type NodeElemDescribe interface {
GetDescription(options *ExplainOptions) (string, error)
}
type OrderByDescribeImpl ¶
type OrderByDescribeImpl struct {
OrderBy []*plan.OrderBySpec
}
func NewOrderByDescribeImpl ¶
func NewOrderByDescribeImpl(OrderBy []*plan.OrderBySpec) *OrderByDescribeImpl
func (*OrderByDescribeImpl) GetDescription ¶
func (o *OrderByDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type RowsetDataDescribeImpl ¶
type RowsetDataDescribeImpl struct {
RowsetData *plan.RowsetData
}
func (*RowsetDataDescribeImpl) GetDescription ¶
func (r *RowsetDataDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type StatisticValue ¶ added in v0.6.0
type Statistics ¶ added in v0.6.0
type Statistics struct { Memory []StatisticValue `json:"Memory"` Throughput []StatisticValue `json:"Throughput"` IO []StatisticValue `json:"IO"` Network []StatisticValue `json:"Network"` }
func NewStatistics ¶ added in v0.6.0
func NewStatistics() *Statistics
type Step ¶ added in v0.6.0
type TotalStats ¶ added in v0.6.0
type UpdateCtxsDescribeImpl ¶ added in v0.6.0
func (*UpdateCtxsDescribeImpl) GetDescription ¶ added in v0.6.0
func (u *UpdateCtxsDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
type WinSpecDescribeImpl ¶
type WinSpecDescribeImpl struct {
WinSpec *plan.WindowSpec
}
func (*WinSpecDescribeImpl) GetDescription ¶
func (w *WinSpecDescribeImpl) GetDescription(options *ExplainOptions) (string, error)
Click to show internal directories.
Click to hide internal directories.