Skip to main content

resolve_values

Function resolve_values 

Source
pub fn resolve_values<V>(
    composed: &ComposedSql,
    values: &mut BTreeMap<String, Vec<V>>,
) -> Result<Vec<V>>
Expand description

Given a ComposedSql with ordered bind param names and a map of named values, produce the ordered value vector matching placeholder order.

For single-value bindings, each name maps to one value. For multi-value bindings (e.g. IN clauses), the composed SQL already has the correct number of placeholders per binding name, so we flatten all values for each occurrence.