Expand description
Typed parsing for the graph DSL (GRAPH ..., MATCH ...).
The handler layer historically parsed graph statements with
upper.find("KEYWORD") substring matching, which collapsed when
a node id, label, or property value shadowed a DSL keyword. This
module is the structural replacement: a quote- and brace-aware
tokeniser feeds a variant-building parser that produces a typed
NodedbStatement. Every graph DSL command flows through here
before reaching a pgwire handler, so the handlers never touch
raw SQL again.
Values collected here are intentionally unvalidated — numeric
bounds, absent-but-required fields, and engine-level caps are
enforced at the pgwire boundary where the error response is
formed. That keeps this module free of pgwire dependencies
and out of the nodedb → nodedb-sql dependency edge.
Functions§
- try_
parse - Entry point: returns
Somewhensqlstarts with a graph DSL keyword (GRAPH ...,MATCH ...,OPTIONAL MATCH ...), elseNoneso the main DDL parser can continue trying other cases.