Skip to main content

AsyncSQLEngine

Trait AsyncSQLEngine 

Source
pub trait AsyncSQLEngine {
    type Error;

    // Required methods
    fn sql<'a>(
        &'a self,
        query: &'a str,
        params: &'a [SQLParam],
    ) -> impl Future<Output = Result<SQLResult, Self::Error>> + Send + 'a;
    fn sql_batch<'a>(
        &'a self,
        statements: &'a [(&'a str, &'a [SQLParam])],
    ) -> impl Future<Output = Result<Vec<SQLResult>, Self::Error>> + Send + 'a;
}
Expand description

Common asynchronous SQL interface implemented by embedded and HTTP engines.

Required Associated Types§

Required Methods§

Source

fn sql<'a>( &'a self, query: &'a str, params: &'a [SQLParam], ) -> impl Future<Output = Result<SQLResult, Self::Error>> + Send + 'a

Source

fn sql_batch<'a>( &'a self, statements: &'a [(&'a str, &'a [SQLParam])], ) -> impl Future<Output = Result<Vec<SQLResult>, Self::Error>> + Send + 'a

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§