analyzer

package
v0.0.0-...-d9b39ff Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 14 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 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) Analyze

func (c *CachedAnalyzer) Analyze(
	ctx context.Context,
	n ast.Node,
	q string,
	schema []string,
	np *named.ParamSet,
) (*analysis.Analysis, error)

func (*CachedAnalyzer) Close

func (c *CachedAnalyzer) Close(ctx context.Context) error

func (*CachedAnalyzer) EnsureConn

func (c *CachedAnalyzer) EnsureConn(ctx context.Context, migrations []string) error

func (*CachedAnalyzer) GetColumnNames

func (c *CachedAnalyzer) GetColumnNames(ctx context.Context, query string) ([]string, error)

Jump to

Keyboard shortcuts

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