Skip to main content

SqlTransport

Trait SqlTransport 

Source
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§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn fetch_all_compact_sql( &self, query: &CompiledQuery, ) -> impl Future<Output = Result<Vec<CompactRow>, Self::Error>> + Send

Source

fn execute_sql( &self, query: &CompiledQuery, ) -> impl Future<Output = Result<u64, Self::Error>> + Send

Provided Methods§

Source

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".

Implementors§