[][src]Trait extremedb::sql::engine::Engine

pub trait Engine {
    fn get_engine(&self) -> database_t;

    fn execute_statement(&self, sql: &str, args: &[&dyn ToValue]) -> Result<i64> { ... }
fn execute_query<'a>(
        &'a self,
        sql: &str,
        args: &[&dyn ToValue]
    ) -> Result<Option<DataSource<'a>>> { ... } }

The common SQL Engine trait.

This trait is implemented by both the local SQL engine and the remote SQL client.

Required methods

fn get_engine(&self) -> database_t

Returns the internal engine handle.

Loading content...

Provided methods

fn execute_statement(&self, sql: &str, args: &[&dyn ToValue]) -> Result<i64>

Executes the SQL statement in the context of the engine.

Returns the number of affected rows, if available.

fn execute_query<'a>(
    &'a self,
    sql: &str,
    args: &[&dyn ToValue]
) -> Result<Option<DataSource<'a>>>

Executes the SQL query in the context of the engine.

Returns the produced data source if available, otherwise None.

Loading content...

Implementors

impl<'a> Engine for LocalEngine<'a>[src]

impl<'a> Engine for LocalEngineSession<'a>[src]

impl<'a> Engine for RemoteEngine<'a>[src]

Loading content...