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

Method isTokenMatch

pkg/sql/parser/ddl.go:35–38  ·  view source on GitHub ↗

isTokenMatch checks if the current token matches the given keyword This handles both keyword tokens and identifier tokens with matching literal values (needed because some keywords like DATA, NO may be tokenized as identifiers)

(keyword string)

Source from the content-addressed store, hash-verified

33// This handles both keyword tokens and identifier tokens with matching literal values
34// (needed because some keywords like DATA, NO may be tokenized as identifiers)
35func (p *Parser) isTokenMatch(keyword string) bool {
36 // Check if token literal matches the keyword (case-insensitive)
37 return strings.EqualFold(p.currentToken.Token.Value, keyword)
38}
39
40// parseCreateStatement parses CREATE statements (TABLE, VIEW, MATERIALIZED VIEW, INDEX)
41func (p *Parser) parseCreateStatement() (ast.Statement, error) {

Callers 15

parseCreateStatementMethod · 0.95
parseCreateTableMethod · 0.95
parseStatementMethod · 0.95
isJoinKeywordMethod · 0.95
parseFromClauseMethod · 0.95
parseJoinTypeMethod · 0.95
parseSampleClauseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected