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
from RoundSparrow@lemmy.ml to rust@lemmy.ml on 07 Aug 2023 20:03
https://lemmy.ml/post/2982925

In lemmy_server, at this code point: github.com/LemmyNet/lemmy/blob/…/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.

#rust

threaded - newest