Skip to main content

replace_rows

Function replace_rows 

Source
pub fn replace_rows(
    path: &Path,
    ddl: &str,
    table: &str,
    columns: &[(&str, &str)],
    delete: (&str, &[Param]),
    insert: &str,
    rows: &[Vec<Param>],
) -> Result<(), InterchangeError>
Expand description

Replace one table’s rows in place, inside a store other writers share (a Hermes home’s state.db): create the table when absent (ddl), add any column columns names that it lacks (Hermes’s own schema reconcile only ever adds columns), delete the rows delete selects and insert rows, in one transaction. Every other table in the file is left as it is.