explain

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

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