MCPcopy Create free account
hub / github.com/bytebase/bytebase / isDMLKeyword

Function isDMLKeyword

backend/plugin/parser/partiql/completion.go:475–482  ·  view source on GitHub ↗

isDMLKeyword returns true if the keyword is a DML/DDL operation that should be excluded in query-only (read-only) editor scenes.

(w string)

Source from the content-addressed store, hash-verified

473// isDMLKeyword returns true if the keyword is a DML/DDL operation that
474// should be excluded in query-only (read-only) editor scenes.
475func 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

Callers 1

CompletionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected