pub trait CountQuery<Idx> { }Expand description
SELECT count(*) over a query’s FROM/JOIN/WHERE/GROUP BY, with
its ORDER BY/LIMIT/OFFSET dropped — a total counts the rows that
match, not the page being shown. Returns a number rather than an
Option, since a count query always produces exactly one row.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl<Output> CountQuery<()> for DynSelect<Postgres, Output>
Erasure is for a query whose joins depend on a condition, and such a query is paged like any other, so it counts like any other. The same goes for a set-operation chain.