pub trait SqlTransport: Send + Sync {
type Error: Error + Send + Sync + 'static;
// Required methods
fn fetch_all_compact_sql(
&self,
query: &CompiledQuery,
) -> impl Future<Output = Result<Vec<CompactRow>, Self::Error>> + Send;
fn execute_sql(
&self,
query: &CompiledQuery,
) -> impl Future<Output = Result<u64, Self::Error>> + Send;
// Provided method
fn fetch_repeated_compact_sql(
&self,
template: &CompiledQuery,
param_index: usize,
values: &[Value],
) -> impl Future<Output = Result<Vec<CompactRow>, Self::Error>> + Send { ... }
}Required Associated Types§
Required Methods§
fn fetch_all_compact_sql( &self, query: &CompiledQuery, ) -> impl Future<Output = Result<Vec<CompactRow>, Self::Error>> + Send
fn execute_sql( &self, query: &CompiledQuery, ) -> impl Future<Output = Result<u64, Self::Error>> + Send
Provided Methods§
fn fetch_repeated_compact_sql( &self, template: &CompiledQuery, param_index: usize, values: &[Value], ) -> impl Future<Output = Result<Vec<CompactRow>, Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".