Skip to main content

Executor

Trait Executor 

Source
pub trait Executor {
    // Required methods
    fn query_raw(
        &self,
        sql: &str,
        sql_hash: u64,
        params: &[&(dyn Encode + Sync)],
    ) -> BsqlResult<OwnedResult>;
    fn query_raw_readonly(
        &self,
        sql: &str,
        sql_hash: u64,
        params: &[&(dyn Encode + Sync)],
    ) -> BsqlResult<OwnedResult>;
    fn execute_raw(
        &self,
        sql: &str,
        sql_hash: u64,
        params: &[&(dyn Encode + Sync)],
    ) -> BsqlResult<u64>;
}
Expand description

Sync variant of the Executor trait. No async runtime required.

Required Methods§

Source

fn query_raw( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<OwnedResult>

Source

fn query_raw_readonly( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<OwnedResult>

Source

fn execute_raw( &self, sql: &str, sql_hash: u64, params: &[&(dyn Encode + Sync)], ) -> BsqlResult<u64>

Implementors§

Source§

impl Executor for Pool

Available on non-crate feature async only.

Sync: plain acquire() + query(). No tokio.

Source§

impl Executor for PoolConnection

Available on non-crate feature async only.
Source§

impl Executor for Transaction

Available on non-crate feature async only.