Expand description
Lexical boundaries of SQL text under one backend’s rules: where quoted text, comments, parameters and words begin and end. It is not a grammar.
The builder finds the markers of SQL fragments with it, the engine reads raw statements with it, and TideORM inspects the SQL it runs with it.
Structs§
- Token
- One lexical unit of a statement.
Enums§
- Dialect
- Whose lexical rules a scan follows.
- Escape
Mode - How a quoted run escapes its closing quote.
- Kind
- What a
Tokenis. - Quoted
Run - How a quoted run ends.
Functions§
- block_
comment_ len - The length of the block comment opening
sql, to the end ofsqlwhen it is not closed. - dollar_
tag_ len - The length of the PostgreSQL dollar-quote delimiter opening
sql,$$or$tag$, whose tag does not start with a digit. - identifier_
char - Whether
ccan continue an unquoted identifier. - quoted_
end - Scan after an opening delimiter. Positions may be bytes or character indices; callers supply the corresponding width and end so validation stays allocation-free.
- quoted_
len - The length of the quoted run
sqlopens withdelimiter([closes with]), to the end ofsqlwhen it is not closed. - tokens
- The tokens of
sqlunderdialect’s rules, lexed only as far as the caller reads.