Expand description
SQL Parser
MacrosΒ§
- maybe π
- parser_
err π
StructsΒ§
- Parser π
- SQL Parser
- Parser
Error - Parser
Statement Error - Statement
Parse Result - The result of successfully parsing a statement: both the AST and the SQL text that it corresponds to
EnumsΒ§
- IsLateral π
- IsOptional π
- Parenthesized
Fragment π - Represents an expression or query (a βfragmentβ) with parentheses around it, when it is unknown whether the fragment belongs to a larger expression or query.
- Precedence π
- Defines a number of precedence classes operators follow. Since this enum derives Ord, the precedence classes are ordered from weakest binding at the top to tightest binding at the bottom.
- SetPrecedence π
ConstantsΒ§
- ANY_
ALL_ πKEYWORDS - Keywords that indicate the start of an
ANY
orALL
subquery operation. - MAX_
STATEMENT_ BATCH_ SIZE - Maximum allowed size for a batch of statements in bytes: 1MB.
- QUERY_
START_ πKEYWORDS - Keywords that indicate the start of a (sub)query.
- RECURSION_
LIMIT π
TraitsΒ§
FunctionsΒ§
- parse_
data_ type - Parses a SQL string containing a single data type.
- parse_
expr - Parses a SQL string containing one SQL expression.
- parse_
statements - Parses a SQL string containing zero or more SQL statements.
- parse_
statements_ with_ limit - Parses a SQL string containing zero or more SQL statements.
Statements larger than
MAX_STATEMENT_BATCH_SIZE
are rejected. - split_
identifier_ string - Parses a string containing a comma-separated list of identifiers and returns their underlying string values.