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

Function quotedIdentifierIfNeeded

backend/plugin/parser/redshift/completion.go:262–267  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

260}
261
262func quotedIdentifierIfNeeded(s string) string {
263 if strings.ToLower(s) != s || !isValidUnquotedIdentifier(s) {
264 return quoteIdent(s)
265 }
266 return s
267}
268
269// isValidUnquotedIdentifier checks if the identifier can be used without quotes in Redshift.
270func isValidUnquotedIdentifier(s string) bool {

Callers 1

completionCandidateTextFunction · 0.85

Calls 2

quoteIdentFunction · 0.70

Tested by

no test coverage detected