Skip to main content

Crate relate_parser

Crate relate_parser 

Source

Re-exports§

pub use error::ParseError;
pub use error::ParseResult;
pub use parser::literal_argument_mismatch;
pub use parser::parse;
pub use parser::parse_graph_type_body;
pub use parser::parse_with_options;
pub use parser::selector_is_selective;
pub use token::Token;
pub use token::TokenType;
pub use ast::*;
pub use type_normalize::*;

Modules§

ast
error
lexer
parser
token
type_normalize
CIP-100 canonical type normalization and name rendering.

Structs§

AuthoredSpelling
One extracted literal’s authored spelling (ADR-0718): the placeholder name the compiled plan carries, and the authored source text the naming path substitutes it with. Named fields, never a positional pair — which side is the placeholder is a compile-time fact, not a destructuring convention.
Normalized
The normalizer’s outputs. See the module documentation.

Enums§

NormalizeOutcome
What normalize_statement produced.
NormalizedValue
One extracted literal value: the normalizer’s own small vocabulary (the parser crate does not depend on the engine’s value type). The facade converts these into parameter values at the one boundary where both exist.

Functions§

authored_spellings
Zip a normalization’s AuthoredSpellings — the one construction, from the two parallel vectors the normalizer produced (generic over the value type: the normalizer’s own NormalizedValue, the engine’s Value, whatever channel carries the pairs).
column_carries_auto_parameter
Whether a rendered result column carries the auto-parameter prefix (the compiled plan spells an unaliased auto-extracted item as the placeholder) — the text-level half of the epilogue’s re-parse trigger, beside the name-level name_is_auto_parameter: the two consult one prefix, one on names the plan holds typed, one on the column text the plan rendered.
name_is_auto_parameter
Whether name is an auto-parameter name ([AUTO_PARAM_PREFIX]) — the one spelling of the prefix test, shared by the caller-map boundary above and the planner’s auto-parameter plan predicate (the dispatch epilogue’s authored-name restore is keyed on the same prefix, ADR-0663).
normalize_statement
Normalize src under the same ParseOptions the real parse would use (the preview gates change what the lexer produces, so the template must be derived from the identical token stream).
params_carry_reserved_prefix
Whether a caller’s parameter map carries any [AUTO_PARAM_PREFIX]-named key — the one spelling of the reserved-prefix collision policy, consulted at the one boundary that decides cache participation — the facade’s Connection::cache_lookup, before the raw stage — where such a caller disables the cache for the statement entirely. Generic over the value type — the policy is about the names only.
substitute_auto_parameters
Replace every auto-parameter placeholder in text with its authored spelling (ADR-0718) — the one substitution, in the crate that owns the placeholder grammar. Three rules make it safe on rendered column text, which is a verbatim substring of the rewritten statement:

Type Aliases§

AuthoredSpellings
The extracted literals’ authored spellings, one per literal, in creation order — the pairs the naming path substitutes with, [Normalized::values] zipped with [Normalized::spellings], carried beside the values on every cache channel that already carries them. The placeholder’s authored text is data, never re-derived by a parse at result time.