Expand description
User-supplied positional parameter binding for $N placeholders.
Tracer-bullet half of issue #353. The parser emits Expr::Parameter
nodes when it sees $N; this module validates that the indices form
a contiguous 0-based range and substitutes the user-provided values
into the AST. Type validation is delegated to the existing engine
type checker, which runs on the substituted literals downstream.
Structs§
- Parameter
Ref - One parameter placeholder found in the parsed query AST.
Enums§
- User
Param Error - Errors surfaced when binding fails. The wire layer turns these into
QUERY_ERROR/INVALID_PARAMSresponses.
Functions§
- bind
- One-shot helper: validate arity/gaps then substitute the values.
- bind_
parameters - One-shot helper matching the parameter-contract ADR wording.
- collect_
indices - Walk
expr, collect everyExpr::Parameter { index }encountered. Also picks up parameter slots that live outside theExprtree — today only the vector slot ofSEARCH SIMILAR $N(see #355). - expr_
contains_ parameter - Recursively check whether
exprcontains anyExpr::Parameternode. Used by the INSERT parser to know when to defer literal folding to the user_params binder. - scan_
parameters - Walk
expr, collecting parameter placeholders that carry source spans. - validate
- Validate that the indices used by the SQL match the caller’s supplied params (contiguous from 0, length match).
Type Aliases§
- Bind
Error - Public bind error alias matching the parameter-contract ADR wording.