MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / expandSelectStmtInner

Method expandSelectStmtInner

internal/x/expander/expander.go:146–156  ·  view source on GitHub ↗

expandSelectStmtInner expands nested structures without re-processing the target list

(ctx context.Context, stmt *ast.SelectStmt)

Source from the content-addressed store, hash-verified

144
145// expandSelectStmtInner expands nested structures without re-processing the target list
146func (e *Expander) expandSelectStmtInner(ctx context.Context, stmt *ast.SelectStmt) error {
147 // Expand subqueries in FROM clause
148 if stmt.FromClause != nil {
149 for _, fromItem := range stmt.FromClause.Items {
150 if err := e.expandFromClause(ctx, fromItem); err != nil {
151 return err
152 }
153 }
154 }
155 return nil
156}
157
158// getCTEColumnNames gets the column names for a CTE by constructing a query with proper context
159func (e *Expander) getCTEColumnNames(ctx context.Context, stmt *ast.SelectStmt, targetCTE *ast.CommonTableExpr) ([]string, error) {

Callers 1

expandSelectStmtMethod · 0.95

Calls 1

expandFromClauseMethod · 0.95

Tested by

no test coverage detected