keyword in a dialect that supports it. PIVOT is non-reserved, so it may arrive as either an identifier or a keyword token.
()
| 90 | // keyword in a dialect that supports it. PIVOT is non-reserved, so it may |
| 91 | // arrive as either an identifier or a keyword token. |
| 92 | func (p *Parser) isPivotKeyword() bool { |
| 93 | if !p.pivotDialectAllowed() { |
| 94 | return false |
| 95 | } |
| 96 | t := p.currentToken.Token.Type |
| 97 | if t != models.TokenTypeKeyword && t != models.TokenTypeIdentifier { |
| 98 | return false |
| 99 | } |
| 100 | return strings.EqualFold(p.currentToken.Token.Value, "PIVOT") |
| 101 | } |
| 102 | |
| 103 | // isUnpivotKeyword mirrors isPivotKeyword for UNPIVOT. |
| 104 | func (p *Parser) isUnpivotKeyword() bool { |
no test coverage detected