fn update(&'e self, pool: E) -> CrudFut<'e, Self> {
        Box::pin(async move {
            let query = sqlx::query_as::<E::Database, Self>(<Self as Schema>::update_by_id_sql());
            let query = self.update_binds(query);
            let r = query.fetch_one(pool).await?;

            Ok(r)
        })
    }
/// Updates the database with the current instance state and returns a
/// future that resolves an `()` on success and `sqlx::Error` on error.
///
/// # Example
///
/// ```rust
/// # sqlx_crud::doctest_setup! { |pool| {
/// use sqlx_crud::Crud;
///
/// if let Some(mut user) = User::by_id(&pool, 1).await? {
///     user.name = "Harry".to_string();
///     let user = user.update(&pool).await?;
///     assert_eq!("Harry", user.name);
/// }
/// # }}
/// ```
Updates the database with the current instance state and returns a
future that resolves an `()` on success and `sqlx::Error` on error.
Updates the database with the current instance state and returns a future that resolves an ` () ` on success and ` sqlx :: Error ` on error .
fn update(&'e self, pool: E) -> CrudFut<'e, Self> {
        Box::pin(async move {
            let query = sqlx::query_as::<E::Database, Self>(<Self as Schema>::update_by_id_sql());
            let query = self.update_binds(query);
            let r = query.fetch_one(pool).await?;
            Ok(r)
        })
    }
fn update ( & ' e self , pool : E ) -> CrudFut < ' e , Self > { Box :: pin ( async move { let query = sqlx :: query_as :: < E :: Database , Self > ( < Self as Schema > :: update_by_id_sql ( ) ) ; let query = self . update_binds ( query ) ; let r = query . fetch_one ( pool ) . await ? ; Ok ( r ) } ) }
Updates the database with the current instance state and returns a
future that resolves an `()` on success and `sqlx::Error` on error.
Updates the database with the current instance state and returns a future that resolves an ` () ` on success and ` sqlx :: Error ` on error .
&'e self
pool
E
&'e self
pool
E
example
None
sqlx_crud::doctest_setup! { |pool| {
use sqlx_crud::Crud.

if let Some(mut user) = User::by_id(&pool, 1).await.
use sqlx_crud :: Crud . if let Some ( mut user ) = User :: by_id ( &pool 1 ) . await .
}}
None