planalyze

package
v0.0.0-...-1390f1c Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg Config, logFile string) error

Types

type AnalyzedQuery

type AnalyzedQuery struct {
	QueryStructure string
	Complexity     PlanComplexity
	PlanOutput     json.RawMessage
}

type Config

type Config struct {
	VSchemaFile          string
	VtExplainVschemaFile string
}

type Output

type Output struct {
	FileType     string          `json:"fileType"`
	PassThrough  []AnalyzedQuery `json:"passThrough"`
	SimpleRouted []AnalyzedQuery `json:"simpleRouted"`
	Complex      []AnalyzedQuery `json:"complex"`
	Unplannable  []AnalyzedQuery `json:"unplannable"`
}

func ReadPlanalyzeFile

func ReadPlanalyzeFile(filename string) (p Output, err error)

type PlanComplexity

type PlanComplexity int
const (
	PassThrough PlanComplexity = iota
	SimpleRouted
	Complex
	Unplannable
)

func (PlanComplexity) String

func (p PlanComplexity) String() string

type Planalyze

type Planalyze struct {
	Queries [4][]AnalyzedQuery
}

Planalyze is the main struct for the planalyze tool. It is a size four slice as we have four different types of analyzed queries

Jump to

Keyboard shortcuts

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