selectIntoTarget returns the INTO target of sel, searching set-operation arms — T-SQL attaches INTO to the first arm of a UNION, not the root.
(sel *ast.SelectStmt)
| 54 | // selectIntoTarget returns the INTO target of sel, searching set-operation |
| 55 | // arms — T-SQL attaches INTO to the first arm of a UNION, not the root. |
| 56 | func selectIntoTarget(sel *ast.SelectStmt) *ast.TableRef { |
| 57 | if sel == nil { |
| 58 | return nil |
| 59 | } |
| 60 | if sel.IntoTable != nil { |
| 61 | return sel.IntoTable |
| 62 | } |
| 63 | if target := selectIntoTarget(sel.Larg); target != nil { |
| 64 | return target |
| 65 | } |
| 66 | return selectIntoTarget(sel.Rarg) |
| 67 | } |
no outgoing calls
no test coverage detected