You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: refactor core to simplify the code structure and API - #786
This pull request primarily refactors and improves the handling of condition clauses and their tests in the query builder. The most significant changes include simplifying generic types in condition classes, enhancing test coverage for complex "having" and "where" clause interactions, and cleaning up unused or redundant code.
HAVING clauses are incorrectly stamped as where components
QueryBuilder/Query.Having.cs:10
All simple HAVING APIs delegate to extensions that add the clause as component "where". This makes the compatibility Clauses property non-round-trippable: reading a query's clauses and assigning them to another query routes HAVING clauses into Wheres at lines 68-74. Ensure clauses inserted through Havings are stamped as "having" centrally.
Null engine matching affects all scoped WHERE clauses
QueryBuilder/Query.cs:219
When engineCode is null, this predicate matches every scoped WHERE clause rather than only the generic clause. A query containing generic and engine-specific conditions will therefore throw from SingleOrDefault() (or remove the sole engine-specific clause) when replacing the generic condition.
This issue also appears on line 225 of the same file.
Join replacement broad-matches and loses engine/component metadata
QueryBuilder/Query.cs:234
This branch both broad-matches every join when engineCode is null and adds the replacement without stamping its Engine/Component. Consequently an engine-specific join added through AddOrReplaceComponent becomes generic, and generic replacement can throw when scoped joins coexist.
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
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.
This pull request primarily refactors and improves the handling of condition clauses and their tests in the query builder. The most significant changes include simplifying generic types in condition classes, enhancing test coverage for complex "having" and "where" clause interactions, and cleaning up unused or redundant code.