nodeStmtLoc returns the source Loc of a DML statement node.
(node ast.Node)
| 447 | |
| 448 | // nodeStmtLoc returns the source Loc of a DML statement node. |
| 449 | func nodeStmtLoc(node ast.Node) ast.Loc { |
| 450 | switch n := node.(type) { |
| 451 | case *ast.UpdateStmt: |
| 452 | return n.Loc |
| 453 | case *ast.DeleteStmt: |
| 454 | return n.Loc |
| 455 | } |
| 456 | return ast.Loc{} |
| 457 | } |
| 458 | |
| 459 | func parseCTEPrefix(fullSQL string, stmtLoc ast.Loc) []*ast.CommonTableExpr { |
| 460 | if stmtLoc.Start <= 0 || stmtLoc.Start > len(fullSQL) { |
no outgoing calls
no test coverage detected