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

Method isJoinKeyword

pkg/sql/parser/parser.go:1103–1125  ·  view source on GitHub ↗

isJoinKeyword checks if current token is a JOIN-related keyword

()

Source from the content-addressed store, hash-verified

1101
1102// isJoinKeyword checks if current token is a JOIN-related keyword
1103func (p *Parser) isJoinKeyword() bool {
1104 if p.isAnyType(
1105 models.TokenTypeJoin, models.TokenTypeInner, models.TokenTypeLeft,
1106 models.TokenTypeRight, models.TokenTypeFull, models.TokenTypeCross,
1107 models.TokenTypeNatural,
1108 ) {
1109 return true
1110 }
1111 // SQL Server: OUTER APPLY starts with OUTER
1112 if p.dialect == string(keywords.DialectSQLServer) && p.isType(models.TokenTypeOuter) {
1113 return true
1114 }
1115 // ClickHouse: GLOBAL JOIN — GLOBAL is TokenTypeKeyword, not a dedicated join token
1116 if p.dialect == string(keywords.DialectClickHouse) && p.isTokenMatch("GLOBAL") {
1117 return true
1118 }
1119 // ClickHouse: ANY / ALL as join strictness prefix (ANY LEFT JOIN, ALL INNER JOIN)
1120 if p.dialect == string(keywords.DialectClickHouse) &&
1121 (p.isType(models.TokenTypeAny) || p.isType(models.TokenTypeAll)) {
1122 return true
1123 }
1124 return false
1125}
1126
1127// parseWithStatement parses a WITH statement (Common Table Expression).
1128// It supports both simple and recursive CTEs, multiple CTE definitions, and column specifications.

Callers 1

parseJoinClausesMethod · 0.95

Calls 3

isAnyTypeMethod · 0.95
isTypeMethod · 0.95
isTokenMatchMethod · 0.95

Tested by

no test coverage detected