Struct rustorm::dao::DaoResult [] [src]

pub struct DaoResult {
    pub dao: Vec<Dao>,
    pub renamed_columns: Vec<(ColumnName, String)>,
    pub total: Option<usize>,
    pub page: Option<usize>,
    pub page_size: Option<usize>,
}

meta result of a query useful when doing complex query, and also with paging TODO: good name: DaoRows

Fields

dao
renamed_columns

renamed columns for each table ie. product => [(name, product_name),..];

total

the total number of records

page

page of the query

page_size

page size

Methods

impl DaoResult

fn cast<T: IsTable + IsDao>(&self) -> Vec<T>

cast the dao to the specific struct instance do not include if non nullable parts contains null

fn cast_one<T: IsTable + IsDao>(&self) -> Option<T>

Trait Implementations

impl Encodable for DaoResult

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

Derived Implementations

impl Debug for DaoResult

fn fmt(&self, __arg_0: &mut Formatter) -> Result