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

Method isQualifyKeyword

pkg/sql/parser/pivot.go:82–88  ·  view source on GitHub ↗

isPivotKeyword returns true if the current token is the contextual PIVOT isQualifyKeyword returns true if the current token is the Snowflake / BigQuery QUALIFY clause keyword. QUALIFY tokenizes as an identifier, so detect by value and gate by dialect to avoid consuming a legitimate table alias named

()

Source from the content-addressed store, hash-verified

80// detect by value and gate by dialect to avoid consuming a legitimate
81// table alias named "qualify" in other dialects.
82func (p *Parser) isQualifyKeyword() bool {
83 if p.dialect != string(keywords.DialectSnowflake) &&
84 p.dialect != string(keywords.DialectBigQuery) {
85 return false
86 }
87 return strings.EqualFold(p.currentToken.Token.Value, "QUALIFY")
88}
89
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.

Callers 3

canBeAliasMethod · 0.95
parseJoinedTableRefMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected