stmtTypeName returns a human-readable SQL statement type name.
(stmt ast.Statement)
| 175 | |
| 176 | // stmtTypeName returns a human-readable SQL statement type name. |
| 177 | func stmtTypeName(stmt ast.Statement) string { |
| 178 | switch stmt.(type) { |
| 179 | case *ast.SelectStatement: |
| 180 | return "SELECT" |
| 181 | case *ast.InsertStatement: |
| 182 | return "INSERT" |
| 183 | case *ast.UpdateStatement: |
| 184 | return "UPDATE" |
| 185 | case *ast.DeleteStatement: |
| 186 | return "DELETE" |
| 187 | default: |
| 188 | return "OTHER" |
| 189 | } |
| 190 | } |