insert_or_update

Function insert_or_update 

Source
pub fn insert_or_update(
    table: &str,
    columns: &[&str],
    values: &[&dyn ToKind],
) -> Mutation
Expand description

insert_or_update returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

For a similar example, See update.