isMinusSetOp returns true if the current token is the Snowflake / Oracle MINUS keyword used as a set operator (synonym for EXCEPT). MINUS tokenizes as an identifier; gate by dialect so that MINUS as a legitimate column alias in other dialects is not hijacked.
()
| 97 | // as an identifier; gate by dialect so that MINUS as a legitimate column |
| 98 | // alias in other dialects is not hijacked. |
| 99 | func (p *Parser) isMinusSetOp() bool { |
| 100 | if p.dialect != string(keywords.DialectSnowflake) && |
| 101 | p.dialect != string(keywords.DialectOracle) { |
| 102 | return false |
| 103 | } |
| 104 | if !p.isIdentifier() { |
| 105 | return false |
| 106 | } |
| 107 | return strings.EqualFold(p.currentToken.Token.Value, "MINUS") |
| 108 | } |
no test coverage detected