Trait pgbatis::Parameters

source ·
pub trait Parameters {
    // Required methods
    fn get_table_name(prefix: Option<String>, suffix: Option<String>) -> String;
    fn get_field_list() -> String;
    fn gen_save(
        &self,
        prefix: Option<String>,
        suffix: Option<String>
    ) -> Result<(String, Vec<&(dyn ToSql + Sync)>), String>;
    fn gen_update(
        &self,
        prefix: Option<String>,
        suffix: Option<String>
    ) -> Result<(String, Vec<&(dyn ToSql + Sync)>, u32), String>;
    fn return_one(rows: Row) -> Self;

    // Provided method
    fn return_list(rows: Vec<Row>) -> Vec<Self>
       where Self: Sized { ... }
}

Required Methods§

source

fn get_table_name(prefix: Option<String>, suffix: Option<String>) -> String

source

fn get_field_list() -> String

source

fn gen_save( &self, prefix: Option<String>, suffix: Option<String> ) -> Result<(String, Vec<&(dyn ToSql + Sync)>), String>

source

fn gen_update( &self, prefix: Option<String>, suffix: Option<String> ) -> Result<(String, Vec<&(dyn ToSql + Sync)>, u32), String>

source

fn return_one(rows: Row) -> Self

Provided Methods§

source

fn return_list(rows: Vec<Row>) -> Vec<Self>
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementors§