Skip to main content

Executor

Trait Executor 

Source
pub trait Executor: Sealed {
    // Required methods
    fn query_raw(
        &self,
        sql: &str,
        params: &[&(dyn ToSql + Sync)],
    ) -> impl Future<Output = BsqlResult<Vec<Row>>> + Send;
    fn execute_raw(
        &self,
        sql: &str,
        params: &[&(dyn ToSql + Sync)],
    ) -> impl Future<Output = BsqlResult<u64>> + Send;
}
Expand description

Execute a prepared query and return raw rows.

This trait is sealed — it cannot be implemented outside of bsql-core. The generated code calls query_raw and execute_raw on either &Pool or &PoolConnection.

Required Methods§

Source

fn query_raw( &self, sql: &str, params: &[&(dyn ToSql + Sync)], ) -> impl Future<Output = BsqlResult<Vec<Row>>> + Send

Execute a query and return all rows.

Source

fn execute_raw( &self, sql: &str, params: &[&(dyn ToSql + Sync)], ) -> impl Future<Output = BsqlResult<u64>> + Send

Execute a query and return the number of affected rows.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§