pub trait SelectPage<E, C>where
E: EntityTrait,
C: ConnectionTrait,{
// Required method
fn select_page<'life0, 'async_trait>(
self,
db: &'life0 C,
p: Option<PaginationParam>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<E::Model>, u64)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Available on crate feature
api only.Expand description
Extension for SeaORM Select: execute a query with optional pagination and
get back (items, total_count).
Required Methods§
Sourcefn select_page<'life0, 'async_trait>(
self,
db: &'life0 C,
p: Option<PaginationParam>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<E::Model>, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn select_page<'life0, 'async_trait>(
self,
db: &'life0 C,
p: Option<PaginationParam>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<E::Model>, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch one page when p is given, or the whole result set (with its
length as total) otherwise.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".