QuoteIdent returns a quoted identifier if it needs quoting. This implements the format.Dialect interface.
(s string)
| 19 | // QuoteIdent returns a quoted identifier if it needs quoting. |
| 20 | // This implements the format.Dialect interface. |
| 21 | func (p *Parser) QuoteIdent(s string) string { |
| 22 | if p.IsReservedKeyword(s) || hasMixedCase(s) { |
| 23 | return `"` + s + `"` |
| 24 | } |
| 25 | return s |
| 26 | } |
| 27 | |
| 28 | // TypeName returns the SQL type name for the given namespace and name. |
| 29 | // This implements the format.Dialect interface. |