hasStarInList checks if a target list contains a * expression using astutils.Search
(targets *ast.List)
| 323 | |
| 324 | // hasStarInList checks if a target list contains a * expression using astutils.Search |
| 325 | func hasStarInList(targets *ast.List) bool { |
| 326 | if targets == nil { |
| 327 | return false |
| 328 | } |
| 329 | // Use astutils.Search to find any A_Star node in the target list |
| 330 | stars := astutils.Search(targets, func(n ast.Node) bool { |
| 331 | _, ok := n.(*ast.A_Star) |
| 332 | return ok |
| 333 | }) |
| 334 | return len(stars.Items) > 0 |
| 335 | } |
| 336 | |
| 337 | // getColumnNames prepares the query and returns the column names from the result |
| 338 | func (e *Expander) getColumnNames(ctx context.Context, query string) ([]string, error) { |
no test coverage detected