Expand description
Query analysis pipeline.
QueryAnalyzer is a tiny lexical scanner that:
- Detects the
-- dactyl: <datastore>inline directive. - Detects a fixed list of dialect-specific constructs.
- Returns
Analyzedso the caller (lib.rs / thequery!macro) can decide whether to rewrite, error, or pass through.
The rewriter itself is intentionally a no-op for the first pass — see the follow-up issue for the full plan. The pipeline is wired so swapping in the real rewriter is a one-function change.
Structs§
- Analyzed
- Outcome of analyzing a single query.
- Query
Analyzer - The analyzer. Cheap to construct; carries no state.
Enums§
- Construct
- A single dialect-specific construct the analyzer found in a query.
- Dialect
- SQL dialect an adapter speaks natively.
- Rewrite
- A no-op or trivial rewrite plan.
Functions§
- dialect_
of - Map a datastore name to its native dialect. Returns
Nonefor unknown names; callers should treat that asDactylError::UnknownDatastore. - first_
unsupported - Decide whether the construct list is portable enough for the active dialect.