Documentation
¶
Overview ¶
Package analyzer provides interfaces and implementations for analyzing SQL queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface {
// Analyze extracts table operations from a SQL query
Analyze(queryName, sql string) (*models.QueryTableOp, error)
}
Analyzer defines the interface for SQL query analyzers
type DefaultFactory ¶
type DefaultFactory struct{}
DefaultFactory is the default analyzer factory
func NewDefaultFactory ¶
func NewDefaultFactory() *DefaultFactory
NewDefaultFactory creates a new default factory
type Factory ¶
type Factory interface {
// Create returns an analyzer for the specified engine
Create(engine string) (Analyzer, error)
}
Factory creates analyzers based on the database engine
type MySQLAnalyzer ¶
type MySQLAnalyzer struct {
// contains filtered or unexported fields
}
MySQLAnalyzer analyzes MySQL queries
func NewMySQLAnalyzer ¶
func NewMySQLAnalyzer() *MySQLAnalyzer
NewMySQLAnalyzer creates a new MySQL analyzer
func (*MySQLAnalyzer) Analyze ¶
func (a *MySQLAnalyzer) Analyze(queryName, sql string) (*models.QueryTableOp, error)
Analyze extracts table operations from a MySQL query
Click to show internal directories.
Click to hide internal directories.