sqladvisor

package
v1.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisor

type Advisor interface {
	// GetParser returns the parser
	GetParser() *parser.Parser
	// GetFingerprint returns the fingerprint of the sql text
	GetFingerprint(sqlText string) string
	// GetSQLID returns the identity of the sql text
	GetSQLID(sqlText string) string
	// Advise parses the sql text and returns the tuning advice
	Advise(dbID int, sqlText string) (string, string, error)
}

type Repository

type Repository interface {
	// Execute executes given command and placeholders on the middleware
	Execute(command string, args ...interface{}) (middleware.Result, error)
	// Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
	Transaction() (middleware.Transaction, error)
	// Save saves sql tuning advice into the middleware
	Save(dbID int, sqlText, advice, message string) error
}

type Service

type Service interface {
	// GetFingerprint returns the fingerprint of the sql text
	GetFingerprint(sqlText string) string
	// GetSQLID returns the identity of the sql text
	GetSQLID(sqlText string) string
	// Advise parses the sql text and returns the tuning advice,
	// note that only the first sql statement in the sql text will be advised
	Advise(dbID int, sqlText string) (string, error)
}

Jump to

Keyboard shortcuts

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