isValidUnquotedIdentifier checks if the identifier can be used without quotes in Redshift.
(s string)
| 268 | |
| 269 | // isValidUnquotedIdentifier checks if the identifier can be used without quotes in Redshift. |
| 270 | func isValidUnquotedIdentifier(s string) bool { |
| 271 | if len(s) == 0 { |
| 272 | return false |
| 273 | } |
| 274 | |
| 275 | first := rune(s[0]) |
| 276 | if !unicode.IsLetter(first) && first != '_' { |
| 277 | return false |
| 278 | } |
| 279 | for _, ch := range s[1:] { |
| 280 | if !unicode.IsLetter(ch) && !unicode.IsDigit(ch) && ch != '_' { |
| 281 | return false |
| 282 | } |
| 283 | } |
| 284 | return true |
| 285 | } |
| 286 | |
| 287 | func convertCandidateType(t redshiftcompletion.CandidateType) base.CandidateType { |
| 288 | switch t { |
no outgoing calls
no test coverage detected