Skip to main content

Module graph_parse

Module graph_parse 

Source
Expand description

Typed parsing for the graph DSL (GRAPH ..., MATCH ...).

A quote-, brace- and bracket-aware tokeniser feeds one parser per statement. Each parser reads its clauses left to right and produces a typed [NodedbStatement]. A token that is not a clause of the statement is a parse error, so a misspelled clause keyword never runs the statement with a default. Every graph DSL command flows through here before reaching a handler, so the handlers never touch raw SQL.

Numeric ranges and engine-level caps stay unvalidated here and are enforced at the pgwire boundary, which keeps this module free of pgwire dependencies and out of the nodedb → nodedb-sql edge.

Structure is validated here, because the boundary cannot see it: a required clause that is absent, or a clause value outside its own vocabulary, means no statement reaches the boundary at all. Both are reported as a parse error naming what is wrong.

Re-exports§

pub use fusion_params::FusionKeywords;
pub use fusion_params::FusionParams;
pub use fusion_params::RAG_FUSION_KEYWORDS;
pub use fusion_params::SEARCH_FUSION_KEYWORDS;
pub use fusion_params::parse_search_using_fusion;

Modules§

fusion_params
Shared parameter extraction for graph-vector fusion SQL surfaces.

Functions§

try_parse
Parse a graph DSL statement.