Skip to main content

upsert

Function upsert 

Source
pub fn upsert(
    db: &Db,
    project: &str,
    branch: &str,
    thread: ReviewThread,
) -> Result<()>
Expand description

Insert thread, replacing any existing thread with the same id in the branch’s set; appends when the id is new. Stamps updated_at to now and fills created_at (preserved from the existing row on replace, set to now when the caller left it empty) so a view need not carry a clock.