MCPcopy
hub / github.com/sqlc-dev/sqlc / EnsureConn

Method EnsureConn

internal/analyzer/analyzer.go:126–126  ·  view source on GitHub ↗

EnsureConn initializes the database connection with the given migrations. This is required for database-only mode where we need to connect before analyzing queries.

(ctx context.Context, migrations []string)

Source from the content-addressed store, hash-verified

124 // EnsureConn initializes the database connection with the given migrations.
125 // This is required for database-only mode where we need to connect before analyzing queries.
126 EnsureConn(ctx context.Context, migrations []string) error
127 // GetColumnNames returns the column names for a query by preparing it against the database.
128 // This is used for star expansion in database-only mode.
129 GetColumnNames(ctx context.Context, query string) ([]string, error)

Callers 2

EnsureConnMethod · 0.65
parseQueriesMethod · 0.65

Implementers 3

CachedAnalyzerinternal/analyzer/analyzer.go
Analyzerinternal/engine/postgresql/analyzer/an
Analyzerinternal/engine/sqlite/analyzer/analyz

Calls

no outgoing calls

Tested by

no test coverage detected