pub trait ScopedQuery<'q, DB: SqlxDatabase>: Sized + Send {
// Required methods
fn execute_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<DB::QueryResult, DbError>> + Send + 'q>>;
fn fetch_one_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<DB::Row, DbError>> + Send + 'q>>;
fn fetch_optional_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<Option<DB::Row>, DbError>> + Send + 'q>>;
fn fetch_all_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<Vec<DB::Row>, DbError>> + Send + 'q>>;
fn fetch_scoped(self) -> ScopedStream<'q, DB::Row>;
fn execute_many_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<Vec<DB::QueryResult>, DbError>> + Send + 'q>>;
fn fetch_many_scoped(
self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Either<DB::QueryResult, DB::Row>>, DbError>> + Send + 'q>>;
}Required Methods§
fn execute_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<DB::QueryResult, DbError>> + Send + 'q>>
fn fetch_one_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<DB::Row, DbError>> + Send + 'q>>
fn fetch_optional_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<Option<DB::Row>, DbError>> + Send + 'q>>
fn fetch_all_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DB::Row>, DbError>> + Send + 'q>>
fn fetch_scoped(self) -> ScopedStream<'q, DB::Row>
fn execute_many_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DB::QueryResult>, DbError>> + Send + 'q>>
fn fetch_many_scoped( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Either<DB::QueryResult, DB::Row>>, DbError>> + Send + 'q>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".