Documentation
¶
Index ¶
- type Analyzer
- type CachedAnalyzer
- func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, error)
- func (c *CachedAnalyzer) Close(ctx context.Context) error
- func (c *CachedAnalyzer) EnsureConn(ctx context.Context, migrations []string) error
- func (c *CachedAnalyzer) GetColumnNames(ctx context.Context, query string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface {
Analyze(context.Context, ast.Node, string, []string, *named.ParamSet) (*analysis.Analysis, error)
Close(context.Context) error
// EnsureConn initializes the database connection with the given migrations.
// This is required for database-only mode where we need to connect before analyzing queries.
EnsureConn(ctx context.Context, migrations []string) error
// GetColumnNames returns the column names for a query by preparing it against the database.
// This is used for star expansion in database-only mode.
GetColumnNames(ctx context.Context, query string) ([]string, error)
}
type CachedAnalyzer ¶
type CachedAnalyzer struct {
// contains filtered or unexported fields
}
func (*CachedAnalyzer) EnsureConn ¶
func (c *CachedAnalyzer) EnsureConn(ctx context.Context, migrations []string) error
func (*CachedAnalyzer) GetColumnNames ¶
Click to show internal directories.
Click to hide internal directories.