Skip Navigation

Lemmy Server's (lemmy_server) Rust code, Diesel ORM - how can I have conditional logic if it was an SQL UPDATE instead of a SQL INSERT

In lemmy_server, at this code point: https://github.com/LemmyNet/lemmy/blob/91c024fd987b61ac8892b9e7d1896ee4574751da/crates/db_schema/src/impls/comment.rs#L62

How would I determine if it was an SQL UPDATE or INSERT and skip the remaining blocks of code that do work that does not need to be repeated when a comment edit (UPDATE) is being performed.

Thank you.

1
1 comments