CROSSLINK-274 patron request facets#617
Merged
Merged
Conversation
jakub-id
approved these changes
May 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds faceting support to the Broker patron request listing endpoint (CROSSLINK-274), allowing clients to request aggregated counts by selected fields (currently requester/supplier symbol) alongside the normal paginated results.
Changes:
- Extends OpenAPI for
GET /patron_requestswith afacetsquery parameter and a facets-capableaboutschema. - Implements facets retrieval in the patron request API handler and repo layer, backed by a new SQLC query template plus a CQL-aware execution helper.
- Adds unit + integration tests covering successful faceting and error handling (invalid facet values, DB error).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| broker/test/patron_request/api/api-handler_test.go | Integration tests validating facets behavior via HTTP. |
| broker/sqlc/pr_query.sql | Adds a facets aggregation query template for patron_request_search_view. |
| broker/patron_request/db/prrepo.go | Adds facets types + repo method to fetch facet results. |
| broker/patron_request/db/prcql.go | Adds CQL-aware facets query execution with runtime column substitution. |
| broker/patron_request/api/api-handler.go | Wires facets into GetPatronRequests response (about.facets). |
| broker/patron_request/api/api-handler_test.go | Unit tests for handler error paths when facets are requested. |
| broker/oapi/open-api.yaml | Defines facets parameter + facets result schemas; updates PatronRequests.about schema. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.