Skip to main content

update_row

Function update_row 

Source
pub async fn update_row(
    table: &str,
    columns: &[ColumnInfo],
    pk: &[(String, Value)],
    values: &[(String, Value)],
) -> Result<(), AppError>
Expand description

Updates one row identified by pk (composite-safe - pass more than one entry for a composite key). Any entry in values whose column is also part of pk is skipped for the SET clause (the primary key itself is never rewritten by an edit form).