isDMLKeyword returns true if the keyword is a DML/DDL operation that should be excluded in query-only (read-only) editor scenes.
(w string)
| 473 | // isDMLKeyword returns true if the keyword is a DML/DDL operation that |
| 474 | // should be excluded in query-only (read-only) editor scenes. |
| 475 | func isDMLKeyword(w string) bool { |
| 476 | switch strings.ToUpper(w) { |
| 477 | case "INSERT", "UPDATE", "DELETE", "CREATE", "DROP", "REPLACE", |
| 478 | "UPSERT", "REMOVE", "SET": |
| 479 | return true |
| 480 | } |
| 481 | return false |
| 482 | } |
| 483 | |
| 484 | // stripQuotedIdentifiers replaces double-quoted identifiers with |
| 485 | // placeholder text so that keyword searches don't match content inside |