Skip to main content

Module parser

Module parser 

Source
Expand description

RQL Parser

Parses RQL (RedDB Query Language) tokens into a unified AST. Supports SQL-like table queries, Cypher-like graph patterns, and joins.

§Supported Syntax

§Table Queries

SELECT [columns] FROM table [WHERE condition] [ORDER BY ...] [LIMIT n]

§Graph Queries

MATCH pattern [WHERE condition] RETURN projection

§Join Queries

FROM table [alias] JOIN GRAPH pattern ON condition [RETURN projection]

§Path Queries

PATH FROM selector TO selector [VIA edge_types] [RETURN projection]

§Vector Queries

VECTOR SEARCH collection SIMILAR TO [...] [WHERE ...] [METRIC ...] LIMIT k

§Hybrid Queries

HYBRID (structured query) VECTOR SEARCH ... FUSION strategy LIMIT n

Re-exports§

pub use limits::ParserLimits;

Modules§

limits
Parser DoS limits.

Structs§

ParseError
Parse error
Parser
RQL Parser
SafeTokenDisplay
Display adapter that emits a Token while escaping the caller-controlled byte payload of Ident / String / JsonLiteral / Integer / Float arms.

Enums§

ParseErrorKind
Categorical kind for a parse error.

Functions§

parse
Parse an RQL query string into a QueryWithCte. A leading WITH is consumed as a CTE prelude; any other statement is returned in the QueryWithCte::simple shape (with_clause: None). Callers that don’t care about CTEs read .query to recover the legacy QueryExpr shape.