Revert "feat: [#646] The Where function of Orm supports func condition"#985
Merged
Revert "feat: [#646] The Where function of Orm supports func condition"#985
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reverts the feature implementation that allowed the Orm's Where function to support functional conditions.
- Removed tests validating function-based conditions in query_test.go.
- Removed conditional logic in query.go that handled function-type conditions.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/query_test.go | Removed tests for function type conditions in Where. |
| database/gorm/query.go | Removed function condition handling in Where. |
Comments suppressed due to low confidence (2)
tests/query_test.go:3212
- The removed test case for handling function conditions reduces the test coverage for the Where function; please confirm that this behavior is intended and that no consumers rely on this functionality.
var user5 User
database/gorm/query.go:926
- The removal of this block that handled function-based conditions may impact modules relying on this behavior; verify that reverting this functionality doesn't introduce unintended side effects.
if scope, ok := query.(func(contractsorm.Query) contractsorm.Query); ok {
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #985 +/- ##
=======================================
Coverage 70.04% 70.04%
=======================================
Files 168 168
Lines 11353 11353
=======================================
Hits 7952 7952
Misses 3050 3050
Partials 351 351 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Reverts #975