expandSelectStmtInner expands nested structures without re-processing the target list
(ctx context.Context, stmt *ast.SelectStmt)
| 144 | |
| 145 | // expandSelectStmtInner expands nested structures without re-processing the target list |
| 146 | func (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 |
| 159 | func (e *Expander) getCTEColumnNames(ctx context.Context, stmt *ast.SelectStmt, targetCTE *ast.CommonTableExpr) ([]string, error) { |
no test coverage detected