Substitute all `$N` placeholders in a parsed statement with concrete values.
(stmt: &mut Statement, params: &[ParamValue])
| 43 | |
| 44 | /// Substitute all `$N` placeholders in a parsed statement with concrete values. |
| 45 | pub fn bind_params(stmt: &mut Statement, params: &[ParamValue]) { |
| 46 | if params.is_empty() { |
| 47 | return; |
| 48 | } |
| 49 | let mut binder = ParamBinder { params }; |
| 50 | let _ = stmt.visit(&mut binder); |
| 51 | } |
| 52 | |
| 53 | /// Visitor that rewrites every `Value::Placeholder("$N")` it encounters. |
| 54 | /// |
no test coverage detected