Expand description
Token types for SQL lexer
This module defines the token types used by the SQL lexer and parser.
Structs§
Enums§
- Token
Type - TokenType represents the type of a token
Statics§
- KEYWORDS
- SQL keywords (case-insensitive)
- OPERATORS
- SQL operators
- PUNCTUATORS
- SQL punctuators
Functions§
- is_
keyword - Check if a string is an SQL keyword (case-insensitive) Uses a compiled HashSet for O(1) lookups instead of O(n) linear search
- is_
operator - Check if a string is an SQL operator
- is_
operator_ char - Characters that can be part of an operator
- is_
punctuator - Check if a character is an SQL punctuator
- punctuator_
str - Get a static string for a punctuator character (avoids allocation) Returns None if the character is not a punctuator