Documentation
¶
Index ¶
- type Analyzer
- func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ...) (*core.Analysis, error)
- func (a *Analyzer) Close(_ context.Context) error
- func (a *Analyzer) EnsureConn(ctx context.Context, migrations []string) error
- func (a *Analyzer) GetColumnNames(ctx context.Context, query string) ([]string, error)
- func (a *Analyzer) IntrospectSchema(ctx context.Context, schemas []string) (*catalog.Catalog, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func (*Analyzer) Analyze ¶
func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error)
Don't create a database per query
func (*Analyzer) EnsureConn ¶ added in v1.31.0
EnsureConn initializes the database connection pool if not already done. This is useful for database-only mode where we need to connect before analyzing queries.
func (*Analyzer) GetColumnNames ¶ added in v1.31.0
GetColumnNames implements the expander.ColumnGetter interface. It prepares a query and returns the column names from the result set description.
Click to show internal directories.
Click to hide internal directories.