Skip to content

CROSSLINK-274 patron request facets#617

Merged
adamdickmeiss merged 1 commit into
mainfrom
CROSSLINK-274-rebased
May 27, 2026
Merged

CROSSLINK-274 patron request facets#617
adamdickmeiss merged 1 commit into
mainfrom
CROSSLINK-274-rebased

Conversation

@adamdickmeiss
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 12:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_requests with a facets query parameter and a facets-capable about schema.
  • 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.

Comment thread broker/patron_request/db/prcql.go
Comment thread broker/patron_request/db/prcql.go
@adamdickmeiss adamdickmeiss merged commit 667f671 into main May 27, 2026
7 checks passed
@adamdickmeiss adamdickmeiss deleted the CROSSLINK-274-rebased branch May 27, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants