pub trait SqlForgeQuery<Output> {
type Db: Database;
// Required methods
fn fetch_all<'e, E>(
self,
executor: E,
) -> impl Future<Output = Result<Vec<Output>, Error>> + Send + 'e
where Self: Sized + 'e,
E: Executor<'e, Database = Self::Db> + Send + 'e,
Self::Db: 'e;
fn fetch_one<'e, E>(
self,
executor: E,
) -> impl Future<Output = Result<Output, Error>> + Send + 'e
where Self: Sized + 'e,
E: Executor<'e, Database = Self::Db> + Send + 'e,
Self::Db: 'e;
fn fetch_optional<'e, E>(
self,
executor: E,
) -> impl Future<Output = Result<Option<Output>, Error>> + Send + 'e
where Self: Sized + 'e,
E: Executor<'e, Database = Self::Db> + Send + 'e,
Self::Db: 'e;
fn execute<'e, E>(
self,
executor: E,
) -> impl Future<Output = Result<<Self::Db as Database>::QueryResult, Error>> + Send + 'e
where Self: Sized + 'e,
E: Executor<'e, Database = Self::Db> + Send + 'e,
Self::Db: 'e;
}Required Associated Types§
Required Methods§
fn fetch_all<'e, E>( self, executor: E, ) -> impl Future<Output = Result<Vec<Output>, Error>> + Send + 'e
fn fetch_one<'e, E>( self, executor: E, ) -> impl Future<Output = Result<Output, Error>> + Send + 'e
fn fetch_optional<'e, E>( self, executor: E, ) -> impl Future<Output = Result<Option<Output>, Error>> + Send + 'e
fn execute<'e, E>( self, executor: E, ) -> impl Future<Output = Result<<Self::Db as Database>::QueryResult, Error>> + Send + 'e
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".