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§
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".