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

Method isAnyType

pkg/sql/parser/parser.go:897–904  ·  view source on GitHub ↗

isAnyType checks if the current token's Type matches any of the given types. More efficient than multiple isType calls when checking many alternatives.

(types ...models.TokenType)

Source from the content-addressed store, hash-verified

895// isAnyType checks if the current token's Type matches any of the given types.
896// More efficient than multiple isType calls when checking many alternatives.
897func (p *Parser) isAnyType(types ...models.TokenType) bool {
898 for _, t := range types {
899 if p.isType(t) {
900 return true
901 }
902 }
903 return false
904}
905
906// isIdentifier checks if the current token is an identifier.
907// Includes both regular identifiers and double-quoted identifiers.

Callers 9

parseCreateTableMethod · 0.95
parseTableConstraintMethod · 0.95
parseWindowSpecMethod · 0.95
isJoinKeywordMethod · 0.95
parseFromClauseMethod · 0.95
parseFetchClauseMethod · 0.95
TestIsAnyTypeFunction · 0.95

Calls 1

isTypeMethod · 0.95

Tested by 1

TestIsAnyTypeFunction · 0.76