[][src]Trait orma::DbData

pub trait DbData {
    fn table_name() -> &'static str;
fn pk_filter(&self) -> Vec<(&str, &(dyn ToSql + Sync))>; fn table_name1(&self) -> &'static str { ... }
fn select_part() -> String { ... }
fn select_part1(&self) -> String { ... } }

This trait is maps data in a data table and it's used along with DbEntity structure

Required methods

fn table_name() -> &'static str

The name of the db table where the implementing struct is mapped to.

fn pk_filter(&self) -> Vec<(&str, &(dyn ToSql + Sync))>

In a data table each record is unique by at least a set of keys present in its data column.\n This pk is used to retrieve the id and version of the table record.

Loading content...

Provided methods

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

Table name from instance

fn select_part() -> String

Convenience function that returns the select part for the associated db table.

fn select_part1(&self) -> String

Select part from instance

Loading content...

Implementors

Loading content...