Skip to main content

SqlConn

Trait SqlConn 

Source
pub trait SqlConn {
    // Required methods
    fn query(&mut self, sql: &str) -> Result<Table>;
    fn execute(&mut self, sql: &str, params: &[Cell]) -> Result<()>;
    fn placeholder(&self, n: usize) -> String;
    fn real_type(&self) -> &'static str;
}
Expand description

The operations import_query/export_measure/refresh_sql_measure need from a connection. Implemented for &mut Backend (SQLite or Postgres) and, for backward compatibility with SQLite-only callers, &rusqlite::Connection.

Required Methods§

Source

fn query(&mut self, sql: &str) -> Result<Table>

Source

fn execute(&mut self, sql: &str, params: &[Cell]) -> Result<()>

Source

fn placeholder(&self, n: usize) -> String

Positional placeholder for the n-th (1-based) parameter.

Source

fn real_type(&self) -> &'static str

SQL type keyword for a floating value column in CREATE TABLE.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SqlConn for &Connection

Source§

fn query(&mut self, sql: &str) -> Result<Table>

Source§

fn execute(&mut self, sql: &str, params: &[Cell]) -> Result<()>

Source§

fn placeholder(&self, _n: usize) -> String

Source§

fn real_type(&self) -> &'static str

Implementors§

Source§

impl SqlConn for &mut Backend