Skip to main content

normalize_values_casing

Function normalize_values_casing 

Source
pub fn normalize_values_casing(
    table: &TableSchema,
    values: Map<String, Value>,
) -> Result<Map<String, Value>, String>
Expand description

§5 mutate key normalization: accept BOTH casings for upsert value keys — the SQL-truth snake_case and the generated row types’ camelCase. A camel key renames to its column’s SQL name when that is unambiguous (the alias equals no other column’s exact name, and no two columns share it). A column given in both casings is an error. Unknown keys pass through unchanged (they are ignored downstream, as before).