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

Function NormalizeTSQLIdentifierText

backend/plugin/parser/tsql/tsql.go:81–94  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

79}
80
81func NormalizeTSQLIdentifierText(text string) (original string, lowercase string) {
82 if text == "" {
83 return "", ""
84 }
85 if text[0] == '[' && text[len(text)-1] == ']' {
86 text = text[1 : len(text)-1]
87 }
88
89 s := ""
90 for _, r := range text {
91 s += string(unicode.ToLower(r))
92 }
93 return text, s
94}
95
96// IsTSQLReservedKeyword returns true if the given keyword is a TSQL keywords.
97func IsTSQLReservedKeyword(keyword string, caseSensitive bool) bool {

Calls

no outgoing calls

Tested by

no test coverage detected