pub enum Page {
    Uncounted(u64u16),
    Counted(u64u16),
}
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(u64u16)

Retrieve filtered count only. Argments are start index and number of records.

Counted(u64u16)

Argments are start index and number of records.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more