Skip to main content

Connection

Trait Connection 

Source
pub trait Connection:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn query(
        &self,
        query: String,
        params: Vec<DataType>,
    ) -> FutureResult<Vec<Row>>;
    fn exec(&self, query: String, params: Vec<DataType>) -> FutureResult<u32>;
}
Expand description

SQL providers implement the Connection trait to allow the host to connect to a backend (Azure Table Storage, Postgres, etc) and execute SQL statements.

Required Methods§

Source

fn query(&self, query: String, params: Vec<DataType>) -> FutureResult<Vec<Row>>

Execute a query and return the resulting rows.

Source

fn exec(&self, query: String, params: Vec<DataType>) -> FutureResult<u32>

Execute a query that does not return rows (e.g., an INSERT, UPDATE, or DELETE).

Implementors§