Skip to main content

substitute_params

Function substitute_params 

Source
pub fn substitute_params(stmt: &mut Statement, params: &[Value]) -> Result<()>
Expand description

Substitutes every ?N placeholder in stmt with the matching value from params. Mutates the AST in place — callers should clone first if they want the original back.

Errors if the AST references a placeholder index outside params, or if a non-canonical placeholder form (:name, $1) is encountered.