fn update(&'a self, conn: &PgConnection) -> Result<usize, Error>
    where
        Self::Insertable: AsChangeset<Target = Self::Table>,
        <Self::Table as QuerySource>::FromClause:
            QueryFragment<<PgConnection as Connection>::Backend>,
        <Self::Table as IntoUpdateTarget>::WhereClause: QueryFragment<Pg>,
        <Self::Insertable as AsChangeset>::Changeset: QueryFragment<Pg>,
    {
        let insertable = Self::Insertable::try_from(self)?;
        let update = diesel::update(Self::Table::table());
        let count = update.set(insertable).execute(conn)?;
        Ok(count)
    }
/// Updates an existing entry in the database.
Updates an existing entry in the database.
Updates an existing entry in the database .
fn update(&'a self, conn: &PgConnection) -> Result<usize, Error>
    where
        Self::Insertable: AsChangeset<Target = Self::Table>,
        <Self::Table as QuerySource>::FromClause:
            QueryFragment<<PgConnection as Connection>::Backend>,
        <Self::Table as IntoUpdateTarget>::WhereClause: QueryFragment<Pg>,
        <Self::Insertable as AsChangeset>::Changeset: QueryFragment<Pg>,
    {
        let insertable = Self::Insertable::try_from(self)?;
        let update = diesel::update(Self::Table::table());
        let count = update.set(insertable).execute(conn)?;
        Ok(count)
    }
fn update ( & ' a self , conn : & PgConnection ) -> Result < usize , Error > where Self :: Insertable : AsChangeset < Target = Self :: Table > , < Self :: Table as QuerySource > :: FromClause : QueryFragment < < PgConnection as Connection > :: Backend > , < Self :: Table as IntoUpdateTarget > :: WhereClause : QueryFragment < Pg > , < Self :: Insertable as AsChangeset > :: Changeset : QueryFragment < Pg > , { let insertable = Self :: Insertable :: try_from ( self ) ? ; let update = diesel :: update ( Self :: Table :: table ( ) ) ; let count = update . set ( insertable ) . execute ( conn ) ? ; Ok ( count ) }
Updates an existing entry in the database.
Updates an existing entry in the database .
&'a self
conn
&PgConnection
&'a self
conn
&PgConnection