Yeah, sorry that wasn't very clear. One option for a partial update is do define a new `Update` struct:
struct Bar {
id: Uuid,
column_1: i64,
column_2: i64,
column_3: String,
column_4: Uuid,
}
struct UpdateBar {
column_1: Option<i64>,
column_2: Option<i64>,
column_3: Option<String>,
column_4: Option<Uuid>,
}
UPDATE some_table SET
column_1 = COALESCE($1, column_1),
column_2 = COALESCE($2, column_2),
column_3 = COALESCE($3, column_3),
column_4 = COALESCE($4, column_4),
WHERE id = some_id;
Or, you just never do partial updates :)