EncodeUnrestrictedSQLIdent writes the identifier in s to buf. The identifier is only quoted if the flags don't tell otherwise and the identifier contains special characters.
(buf *bytes.Buffer, s string, flags EncodeFlags)
| 79 | // The identifier is only quoted if the flags don't tell otherwise and |
| 80 | // the identifier contains special characters. |
| 81 | func EncodeUnrestrictedSQLIdent(buf *bytes.Buffer, s string, flags EncodeFlags) { |
| 82 | if !flags.HasFlags(EncAlwaysQuoted) && (flags.HasFlags(EncBareIdentifiers) || IsBareIdentifier(s)) { |
| 83 | buf.WriteString(s) |
| 84 | return |
| 85 | } |
| 86 | EncodeEscapedSQLIdent(buf, s) |
| 87 | } |
| 88 | |
| 89 | // EscapeSQLIdent ensures that the potential identifier in s is fully |
| 90 | // quoted, so that any special character it contains is not at risk |
no test coverage detected
searching dependent graphs…