Skip to main content

Executor

Trait Executor 

Source
pub trait Executor {
    type Database: Database;

    // Required methods
    async fn execute(
        self,
        sql: &str,
        arguments: &[Value],
    ) -> Result<AnyQueryResult, Error>;
    async fn fetch_all(
        self,
        sql: &str,
        arguments: &[Value],
    ) -> Result<Vec<AnyRow>, Error>;
    async fn fetch_optional(
        self,
        sql: &str,
        arguments: &[Value],
    ) -> Result<Option<AnyRow>, Error>;
    async fn fetch_one(
        self,
        sql: &str,
        arguments: &[Value],
    ) -> Result<AnyRow, Error>;
}

Required Associated Types§

Required Methods§

Source

async fn execute( self, sql: &str, arguments: &[Value], ) -> Result<AnyQueryResult, Error>

Source

async fn fetch_all( self, sql: &str, arguments: &[Value], ) -> Result<Vec<AnyRow>, Error>

Source

async fn fetch_optional( self, sql: &str, arguments: &[Value], ) -> Result<Option<AnyRow>, Error>

Source

async fn fetch_one( self, sql: &str, arguments: &[Value], ) -> Result<AnyRow, Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§