Skip to main content

fetch_offset_page

Function fetch_offset_page 

Source
pub async fn fetch_offset_page<C, Entity, Error>(
    db: &C,
    query: Select<Entity>,
    limit: u64,
    offset: u64,
) -> Result<(Vec<Entity::Model>, u64), Error>
where C: ConnectionTrait, Entity: EntityTrait, Error: From<DbError>, for<'db> Select<Entity>: QuerySelect + PaginatorTrait<'db, C>,
Expand description

Fetches an offset page and total count from a SeaORM select query.