| 397 | } |
| 398 | |
| 399 | func isOracleSelectFromDual(selectStmt *oracleast.SelectStmt) bool { |
| 400 | if selectStmt.FromClause == nil || len(selectStmt.FromClause.Items) != 1 { |
| 401 | return false |
| 402 | } |
| 403 | tableRef, ok := selectStmt.FromClause.Items[0].(*oracleast.TableRef) |
| 404 | if !ok || tableRef.Name == nil { |
| 405 | return false |
| 406 | } |
| 407 | return tableRef.Alias == nil && |
| 408 | tableRef.Name.Schema == "" && |
| 409 | tableRef.Name.DBLink == "" && |
| 410 | strings.EqualFold(tableRef.Name.Name, "DUAL") |
| 411 | } |
| 412 | |
| 413 | func hasOracleSubqueriesInSelection(selectStmt *oracleast.SelectStmt) bool { |
| 414 | if selectStmt.TargetList == nil || len(selectStmt.TargetList.Items) == 0 { |