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

Method isPivotKeyword

pkg/sql/parser/pivot.go:92–101  ·  view source on GitHub ↗

keyword in a dialect that supports it. PIVOT is non-reserved, so it may arrive as either an identifier or a keyword token.

()

Source from the content-addressed store, hash-verified

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.
92func (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.
104func (p *Parser) isUnpivotKeyword() bool {

Callers 2

parseJoinedTableRefMethod · 0.95

Calls 1

pivotDialectAllowedMethod · 0.95

Tested by

no test coverage detected