Trait ExecuteBuilder

Source
pub trait ExecuteBuilder {
    type DB: Database;

    // Required methods
    fn execute<C>(
        &self,
        conn: &mut C,
    ) -> impl Future<Output = Result<<Self::DB as Database>::QueryResult, Error>>
       where &'e mut C: for<'e> Executor<'e, Database = Self::DB>;
    fn execute_return<'e, 'c, C, O>(
        &self,
        executor: C,
    ) -> impl Future<Output = Result<Vec<O>, Error>>
       where 'c: 'e,
             C: 'e + Executor<'c, Database = Self::DB>,
             O: 'e + for<'r> FromRow<'r, <Self::DB as Database>::Row> + Send + Unpin;
}

Required Associated Types§

Required Methods§

Source

fn execute<C>( &self, conn: &mut C, ) -> impl Future<Output = Result<<Self::DB as Database>::QueryResult, Error>>
where &'e mut C: for<'e> Executor<'e, Database = Self::DB>,

Source

fn execute_return<'e, 'c, C, O>( &self, executor: C, ) -> impl Future<Output = Result<Vec<O>, Error>>
where 'c: 'e, C: 'e + Executor<'c, Database = Self::DB>, O: 'e + for<'r> FromRow<'r, <Self::DB as Database>::Row> + Send + Unpin,

对于修改和删除操作,如果不是删除单条记录,请谨慎的使用此函数

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§