pub fn update_preferred_name(un: String, update_name: UpdatePreferredName, conn: &PgConnection) -> bool {
        diesel::update(users.filter(users::username.eq(un)))
            .set(users::preferred_name.eq(update_name.preferred_name))
            .execute(conn)
            .is_ok()
    }
/// Attempts to update the preferred name for the user with username `un` to the new name in `update_name`.
/// Returns true if successful or false otherwise.
Attempts to update the preferred name for the user with username `un` to the new name in `update_name`.
Returns true if successful or false otherwise.
Attempts to update the preferred name for the user with username ` un ` to the new name in ` update_name ` . Returns true if successful or false otherwise .
pub fn update_preferred_name(un: String, update_name: UpdatePreferredName, conn: &PgConnection) -> bool {
        diesel::update(users.filter(users::username.eq(un)))
            .set(users::preferred_name.eq(update_name.preferred_name))
            .execute(conn)
            .is_ok()
    }
pub fn update_preferred_name ( un : String , update_name : UpdatePreferredName , conn : & PgConnection ) -> bool { diesel :: update ( users . filter ( users :: username . eq ( un ) ) ) . set ( users :: preferred_name . eq ( update_name . preferred_name ) ) . execute ( conn ) . is_ok ( ) }
Attempts to update the preferred name for the user with username `un` to the new name in `update_name`.
Attempts to update the preferred name for the user with username ` un ` to the new name in ` update_name ` .
un
String
update_name
UpdatePreferredName
conn
&PgConnection
un
String
update_name
UpdatePreferredName
conn
&PgConnection