Skip to main content

update_record

Function update_record 

Source
pub async fn update_record(
    db: &Db,
    table: &str,
    id: &str,
    data: &HashMap<String, String>,
) -> Result<(), Error>
Expand description

Run an UPDATE <table> SET <col = ?>... WHERE id = ? against db. The primary-key column is fixed to id for now (matches the demo table); broaden when a model needs a custom PK column.