Trait Statement

Source
pub trait Statement: Send {
    // Required methods
    fn num_input(&self, callback: BoxedCallback<Option<usize>>);
    fn execute(
        &mut self,
        args: Vec<Argument>,
        callback: BoxedCallback<ExecResult>,
    );
    fn query(
        &mut self,
        args: Vec<Argument>,
        callback: BoxedCallback<Box<dyn Rows>>,
    );
}
Expand description

Statement driver provider trait

Required Methods§

Source

fn num_input(&self, callback: BoxedCallback<Option<usize>>)

Returns the number of placeholder parameters.

May returns None, if the driver doesn’t know its number of placeholder

Source

fn execute(&mut self, args: Vec<Argument>, callback: BoxedCallback<ExecResult>)

Executes a query that doesn’t return rows, such as an INSERT or UPDATE.

Source

fn query(&mut self, args: Vec<Argument>, callback: BoxedCallback<Box<dyn Rows>>)

executes a query that may return rows, such as a SELECT.

Implementors§