Help us shape the future of Go! Take the 2026 Go Developer Survey

analyzer

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 New

func New(db config.Database) *Analyzer

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error)

func (*Analyzer) Close

func (a *Analyzer) Close(_ context.Context) error

func (*Analyzer) EnsureConn

func (a *Analyzer) EnsureConn(ctx context.Context, migrations []string) error

EnsureConn initializes the database connection if not already done. This is useful for database-only mode where we need to connect before analyzing queries.

func (*Analyzer) GetColumnNames

func (a *Analyzer) GetColumnNames(ctx context.Context, query string) ([]string, error)

GetColumnNames implements the expander.ColumnGetter interface. It prepares a query and returns the column names from the result set description.

func (*Analyzer) IntrospectSchema

func (a *Analyzer) IntrospectSchema(ctx context.Context, schemas []string) (*catalog.Catalog, error)

IntrospectSchema queries the database to build a catalog containing tables and columns for the database.

Jump to

Keyboard shortcuts

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