- pub fn update_read(
- conn: &mut PgConnection,
- person_mention_id: PersonMentionId,
- new_read: bool,
- ) -> Result<PersonMention, Error> {
- use crate::schema::person_mention::dsl::*;
- diesel::update(person_mention.find(person_mention_id))
- .set(read.eq(new_read))
- .get_result::<Self>(conn)
- }
-