Expand description
SQL lexer.
This module lexes SQL according to the rules described in the “Lexical Structure” section of the PostgreSQL documentation. The description is intentionally not replicated here. Please refer to that chapter as you read the code in this module.
Where the PostgreSQL documentation is unclear, refer to their flex source instead, located in the backend/parser/scan.l file in the PostgreSQL Git repository.
Macros§
- bail 🔒
Structs§
Enums§
Constants§
- MAX_
IDENTIFIER_ LENGTH - Maximum allowed identifier length in bytes.
Functions§
- lex
- Lexes a SQL query.
- lex_
dollar_ 🔒string - lex_
extended_ 🔒string - lex_
ident 🔒 - lex_
line_ 🔒comment - lex_
multiline_ 🔒comment - lex_
number 🔒 - lex_op 🔒
- lex_
parameter 🔒 - lex_
quoted_ 🔒ident - lex_
string 🔒 - lex_
to_ 🔒adjacent_ string
Type Aliases§
- Ident
String - Newtype that limits the length of identifiers.