(candidate redshiftcompletion.Candidate)
| 251 | } |
| 252 | |
| 253 | func completionCandidateText(candidate redshiftcompletion.Candidate) string { |
| 254 | switch candidate.Type { |
| 255 | case redshiftcompletion.CandidateKeyword, redshiftcompletion.CandidateFunction: |
| 256 | return candidate.Text |
| 257 | default: |
| 258 | return quotedIdentifierIfNeeded(candidate.Text) |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | func quotedIdentifierIfNeeded(s string) string { |
| 263 | if strings.ToLower(s) != s || !isValidUnquotedIdentifier(s) { |
no test coverage detected