| 411 | } |
| 412 | |
| 413 | func hasOracleSubqueriesInSelection(selectStmt *oracleast.SelectStmt) bool { |
| 414 | if selectStmt.TargetList == nil || len(selectStmt.TargetList.Items) == 0 { |
| 415 | return true |
| 416 | } |
| 417 | for _, item := range selectStmt.TargetList.Items { |
| 418 | target, ok := item.(*oracleast.ResTarget) |
| 419 | if !ok || target.Expr == nil { |
| 420 | return true |
| 421 | } |
| 422 | if _, ok := target.Expr.(*oracleast.Star); ok { |
| 423 | return true |
| 424 | } |
| 425 | hasSubquery := false |
| 426 | oracleast.Inspect(target.Expr, func(node oracleast.Node) bool { |
| 427 | if _, ok := node.(*oracleast.SubqueryExpr); ok { |
| 428 | hasSubquery = true |
| 429 | return false |
| 430 | } |
| 431 | return true |
| 432 | }) |
| 433 | if hasSubquery { |
| 434 | return true |
| 435 | } |
| 436 | } |
| 437 | return false |
| 438 | } |