Skip to main content

build_remap_enum_values

Function build_remap_enum_values 

Source
pub fn build_remap_enum_values(
    backend: DatabaseBackend,
    table: &str,
    column: &str,
    mapping: &BTreeMap<i64, i64>,
) -> Result<Vec<BuiltQuery>, QueryError>
Expand description

Build a single atomic UPDATE that re-stamps every row whose stored integer value is being remapped. Empty mapping yields Ok(vec![]) so callers can blindly forward zero-change actions without special casing them.