Skip to content

Conversation

@Azorlogh
Copy link
Contributor

@Azorlogh Azorlogh commented Feb 4, 2026

Needed for query templates

@Azorlogh Azorlogh requested a review from a team as a code owner February 4, 2026 13:32
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

The pull request systematically refactors query/expression.go to convert all public Builder interface methods and constructors from value semantics to pointer semantics. Method receivers across implementing types change from value to pointer receivers, constructor return types now return pointers, and the Walk method signature updated to use pointer value parameters.

Changes

Cohort / File(s) Summary
Builder Interface and Implementations
query/expression.go
Walk method signature changed to accept *any instead of any. All Walk and Build methods on set, keyValue, and not types converted from value receivers to pointer receivers. Constructor functions (Not, Match, Like, Or, And, Lt, Lte, Gt, Gte, Exists, In) updated to return pointer types. Helper function mapMapToExpression returns updated to yield pointers. MarshalJSON method on keyValue receiver changed to pointer.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Pointers now dance where values once stood,
A systematic waltz through the query wood,
Each method and builder, now holds address,
Semantics refined, in this refactored dress!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, mentioning the query templates use case for the mutation capability being introduced.
Title check ✅ Passed The title accurately reflects the main change: converting Walk to use pointer receivers (*any) to enable value mutation, which is the core objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/make-query-builder-mutable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gfyrag gfyrag left a comment

Choose a reason for hiding this comment

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

I think we should upgrade to v4 of the go libs after that.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 18.18182% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.07%. Comparing base (ea66e37) to head (856bac3).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
query/expression.go 18.18% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
+ Coverage   28.68%   29.07%   +0.38%     
==========================================
  Files         162      174      +12     
  Lines        6644     6965     +321     
==========================================
+ Hits         1906     2025     +119     
- Misses       4622     4823     +201     
- Partials      116      117       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Azorlogh Azorlogh changed the title Allow query.Builder.Walk to mutate filter values feat: allow query.Builder.Walk to mutate filter values Feb 4, 2026
@Azorlogh Azorlogh added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit df80fb3 Feb 4, 2026
6 of 8 checks passed
@Azorlogh Azorlogh deleted the feat/make-query-builder-mutable branch February 4, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants