Skip to main content

Module grammar

Module grammar 

Source
Expand description

Grammar rules and parsing combinators.

Modules§

base
Base parsing utilities (identifiers, literals, whitespace).
binary_ops
Binary operator parsing (AND, OR, arithmetic). Binary operator expression parsing.
case_when
CASE WHEN expression parsing. CASE WHEN … THEN … ELSE … END expression parsing.
clauses
Clause parsing (WHERE, ORDER BY, LIMIT, etc.).
cte
Common Table Expression (WITH) parsing.
ddl
Data Definition Language parsing (CREATE TABLE, INDEX).
dml
Data Manipulation Language parsing (INSERT values, ON CONFLICT).
expressions
Expression parsing (columns, functions, sub-expressions). Expression parsing coordinator.
functions
Function call parsing. Function and aggregate parsing.
joins
JOIN clause parsing.
merge
PostgreSQL MERGE parsing. PostgreSQL MERGE parsing.
special_funcs
Special function parsing (COALESCE, NULLIF, GREATEST, etc.). Special SQL functions with keyword syntax.

Functions§

parse
Parse a QAIL query with comment preprocessing. This is the recommended entry point - handles SQL comment stripping and table[filter] shorthand desugaring.
parse_root
Parse a QAIL query (root entry point). Note: Does NOT strip comments. Use parse() for automatic comment handling.