explain

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

explain explain statement

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CostDescribeImpl

type CostDescribeImpl struct {
	Cost *plan.Cost
}

func (*CostDescribeImpl) GetDescription

func (c *CostDescribeImpl) GetDescription(options *ExplainOptions) (string, error)

type ExplainDataBuffer

type ExplainDataBuffer struct {
	Start       int
	End         int
	CurrentLine int
	NodeSize    int
	Lines       []string
}

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
	Anzlyze bool
	Format  ExplainFormat
}

func NewExplainDefaultOptions

func NewExplainDefaultOptions() *ExplainOptions

type ExplainQuery

type ExplainQuery interface {
	ExplainPlan(buffer *ExplainDataBuffer, options *ExplainOptions) error
	ExplainAnalyze(buffer *ExplainDataBuffer, options *ExplainOptions) error
}

type ExplainQueryImpl

type ExplainQueryImpl struct {
	QueryPlan *plan.Query
}

func NewExplainQueryImpl

func NewExplainQueryImpl(query *plan.Query) *ExplainQueryImpl

func (*ExplainQueryImpl) ExplainAnalyze

func (e *ExplainQueryImpl) ExplainAnalyze(buffer *ExplainDataBuffer, options *ExplainOptions) error

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 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)
}

type NodeDescribeImpl

type NodeDescribeImpl struct {
	Node *plan.Node
}

func NewNodeDescriptionImpl

func NewNodeDescriptionImpl(node *plan.Node) *NodeDescribeImpl

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 UpdateListDescribeImpl

type UpdateListDescribeImpl struct {
}

func (*UpdateListDescribeImpl) GetDescription

func (u *UpdateListDescribeImpl) GetDescription(options *ExplainOptions) (string, error)

type WinSpecDescribeImpl

type WinSpecDescribeImpl struct {
	WinSpec *plan.WindowSpec
}

func (*WinSpecDescribeImpl) GetDescription

func (w *WinSpecDescribeImpl) GetDescription(options *ExplainOptions) (string, error)

Jump to

Keyboard shortcuts

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