pub fn delete_user_by_name(name: String, conn: &PgConnection) -> BackendResult<User> {
        use crate::schema::users::dsl::*;

        let target = users.filter(user_name.eq(name));

        diesel::delete(target).get_result(conn).map_err(handle_err::<User>)
    }
/// Deletes the user by their name.
Deletes the user by their name.
Deletes the user by their name .
pub fn delete_user_by_name(name: String, conn: &PgConnection) -> BackendResult<User> {
        use crate::schema::users::dsl::*;
        let target = users.filter(user_name.eq(name));
        diesel::delete(target).get_result(conn).map_err(handle_err::<User>)
    }
pub fn delete_user_by_name ( name : String , conn : & PgConnection ) -> BackendResult < User > { use crate :: schema :: users :: dsl :: * ; let target = users . filter ( user_name . eq ( name ) ) ; diesel :: delete ( target ) . get_result ( conn ) . map_err ( handle_err :: < User > ) }
Deletes the user by their name.
Deletes the user by their name .
name
String
conn
&PgConnection
name
String
conn
&PgConnection