Skip to content

Conversation

@jakub-id
Copy link
Contributor

@jakub-id jakub-id commented Feb 2, 2026

Uses CQL builder instead of string concat for creating CQL.

This PR applies owner restriction separately from the side param so it's possible to make side optional. TBD if this is something we want.

Copilot AI review requested due to automatic review settings February 2, 2026 21:59
Copy link
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

This PR refactors CQL query construction to use the cqlbuilder package instead of string concatenation. The change separates owner restriction logic from the side parameter, enabling more flexible query building while maintaining access control. This represents a shift toward more maintainable and type-safe query construction.

Changes:

  • Replaced string concatenation with CQL builder for query construction
  • Separated owner restriction logic from side parameter handling
  • Added support for cql.allRecords field handling in the CQL parser

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
broker/patron_request/db/prcql.go Adds FieldAllRecords struct to handle cql.allRecords queries
broker/patron_request/api/api-handler.go Refactors query building to use cqlbuilder and separates owner/side restrictions
broker/oapi/open-api.yaml Removes trailing newline
broker/go.mod Updates cql-go dependency to newer version

@jakub-id jakub-id merged commit 0550f78 into main Feb 3, 2026
4 checks passed
@jakub-id jakub-id deleted the cql-builder branch February 3, 2026 10:02
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