MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / isMinusSetOp

Method isMinusSetOp

pkg/sql/parser/select_set_ops.go:99–108  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

97// as an identifier; gate by dialect so that MINUS as a legitimate column
98// alias in other dialects is not hijacked.
99func (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}

Callers 5

canBeAliasMethod · 0.95
parseFromClauseMethod · 0.95
parseJoinedTableRefMethod · 0.95

Calls 1

isIdentifierMethod · 0.95

Tested by

no test coverage detected