Skip to main content

delta_merge_db

Function delta_merge_db 

Source
pub fn delta_merge_db(
    sources: &[(&str, &DB)],
    baseline: Option<&DB>,
    resolutions: &[MergeResolution],
) -> Result<(DB, Vec<MergeConflict>)>
Expand description

Delta-merges multiple DB tables of the same name into one, using baseline (the vanilla/parent version of the table, if any) to tell an intentional edit apart from an untouched row.

Every source is normalized to the first source’s definition first, exactly like the plain DB::merge. Returns the merged table plus any conflicts that need a MergeResolution before they can be applied; unresolved conflicting fields are left at their baseline (or first-candidate, if there’s no baseline) value in the returned table.