Trait IPageRequest

Source
pub trait IPageRequest: Send + Sync {
    // Required methods
    fn page_size(&self) -> u64;
    fn page_no(&self) -> u64;
    fn total(&self) -> u64;
    fn do_count(&self) -> bool;
    fn set_total(&mut self, arg: u64);
    fn set_page_size(&mut self, arg: u64);
    fn set_page_no(&mut self, arg: u64);
    fn set_do_count(&mut self, arg: bool);

    // Provided methods
    fn pages(&self) -> u64 { ... }
    fn offset(&self) -> u64 { ... }
    fn offset_limit(&self) -> u64 { ... }
}
Expand description

PageRequest trait

Required Methods§

Source

fn page_size(&self) -> u64

Source

fn page_no(&self) -> u64

Source

fn total(&self) -> u64

Source

fn do_count(&self) -> bool

Control whether to execute count statements to count the total number

Source

fn set_total(&mut self, arg: u64)

Source

fn set_page_size(&mut self, arg: u64)

Source

fn set_page_no(&mut self, arg: u64)

Source

fn set_do_count(&mut self, arg: bool)

Control execute select count(1) from table

Provided Methods§

Source

fn pages(&self) -> u64

sum pages

Source

fn offset(&self) -> u64

sum offset

Source

fn offset_limit(&self) -> u64

sum offset_limit

Implementors§