pub trait EasyExecutor<D: Driver> {
type InternalExecutor<'b>: Executor<'b, Database = D::InternalDriver>
where Self: 'b;
type IntoInternalExecutor<'b>: Executor<'b, Database = D::InternalDriver>
where Self: 'b;
// Required methods
async fn query_setup<O: SetupSql<D> + Send + Sync>(
&mut self,
sql: O,
) -> Result<O::Output>
where DriverConnection<D>: Send + Sync;
fn executor<'a>(&'a mut self) -> Self::InternalExecutor<'a>;
fn into_executor<'a>(self) -> Self::IntoInternalExecutor<'a>
where Self: 'a;
}Expand description
Abstraction over sqlx::Executor used by the query macros.
Implemented for easy_sql and sqlx connections/pools; most users only need to pass a compatible
connection to query! or query_lazy!.
Will contain sql query watch functions in the future (gated by a feature)
Required Associated Types§
type InternalExecutor<'b>: Executor<'b, Database = D::InternalDriver> where Self: 'b
type IntoInternalExecutor<'b>: Executor<'b, Database = D::InternalDriver> where Self: 'b
Required Methods§
async fn query_setup<O: SetupSql<D> + Send + Sync>( &mut self, sql: O, ) -> Result<O::Output>
fn executor<'a>(&'a mut self) -> Self::InternalExecutor<'a>
fn into_executor<'a>(self) -> Self::IntoInternalExecutor<'a>where
Self: 'a,
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.