Expand description
It tells Toql to build and run an additional query to count the total number of records.
In Toql there are 2 types of counts: A filtered count and a total count. Lets take a datagrid where the user searches his contacts with a name starting with ‘Alice’. The datagrid would show the following:
- Total number of contacts (Unfiltered count)
- Number of found contacts with the name ‘Alice’ (Filtered count)
While the filtered count is almost for free and returned for every query, the total count needs a seperate query with a different SQL filter predicate. Toql can do that out of the box, but the fields must be mapped accordingly in the TableMapper
Variants
Uncounted(u64, u16)
Retrieve filtered count only. Argments are start index and number of records.
Counted(u64, u16)
Argments are start index and number of records.
Implementations
sourceimpl Page
impl Page
pub fn is_counted(&self) -> bool
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more