(text string)
| 79 | } |
| 80 | |
| 81 | func 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. |
| 97 | func IsTSQLReservedKeyword(keyword string, caseSensitive bool) bool { |
no outgoing calls
no test coverage detected