-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add abstraction for counted paginated queries
`PaginatedQueryRunner` has a separate `query_count` method to return the count, but since the total entry count isn't included in the `PaginatedList` data structure, it's annoying to pass between components of a service. Either the result plus the count have to be returned as a tuple, or the service has to add its own data structure to wrap `PaginatedList`. Avoid this by introducing a `CountedPaginatedQueryRunner` and a corresponding `CountedPaginatedList` that always includes a `count` attribute. This can be used by services such as Gafaelfawr that always want to count the total number of entries, either because the table is small or because the count can always be satisfied from the table indices.
- Loading branch information
Showing
4 changed files
with
243 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters