Skip to main content

DBQuery

Trait DBQuery 

Source
pub trait DBQuery {
    // Required methods
    fn query(&self, sql: &str) -> KnowledgeResult<Vec<RowData>>;
    fn query_row(&self, sql: &str) -> KnowledgeResult<RowData>;
    fn query_row_params<P: Params>(
        &self,
        sql: &str,
        params: P,
    ) -> KnowledgeResult<RowData>;
    fn query_row_tdos<P: Params>(
        &self,
        sql: &str,
        params: &[DataField; 2],
    ) -> KnowledgeResult<RowData>;
    fn query_cipher(&self, table: &str) -> KnowledgeResult<Vec<String>>;
}

Required Methods§

Source

fn query(&self, sql: &str) -> KnowledgeResult<Vec<RowData>>

Source

fn query_row(&self, sql: &str) -> KnowledgeResult<RowData>

Source

fn query_row_params<P: Params>( &self, sql: &str, params: P, ) -> KnowledgeResult<RowData>

Source

fn query_row_tdos<P: Params>( &self, sql: &str, params: &[DataField; 2], ) -> KnowledgeResult<RowData>

Source

fn query_cipher(&self, table: &str) -> KnowledgeResult<Vec<String>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§