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 effects from a SQL query
Analyze(queryName, sql string) (string, 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
Click to show internal directories.
Click to hide internal directories.