Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Schmitt <[email protected]>
  • Loading branch information
tphoney and DavidS-ovm authored Jul 15, 2024
1 parent c1f1da0 commit 2b84e8a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions changes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@ message PaginationResponse {
// The number of items in the current page
int32 pageSize = 1;

// The total number of items available. Expensive to calculate https://www.cybertec-postgresql.com/en/pagination-problem-total-result-count/
// this is done as a separate query
// The total number of items available. While this is expensive to calculate (see
// https://www.cybertec-postgresql.com/en/pagination-problem-total-result-count/
// for a comprehensive write-up of options), it'll support a better UX indicating where
// the current page is located in the mass of data available. Services can use various
// ways to optimize this as they see fit.
int32 totalItems = 2;

// The current page number
Expand All @@ -285,7 +288,10 @@ message PaginationResponse {
}

message ListHomeChangesRequest {
PaginationRequest pagination = 1;
// Request a specific page out of the result set. If no PaginationRequest is provided, the entire set is returned.
// Note that eventually this behaviour will change and services will start to return the first page instead of the
// entire dataset to protect themselves.
optional PaginationRequest pagination = 1;
}

message ListHomeChangesResponse {
Expand Down

0 comments on commit 2b84e8a

Please sign in to comment.