Repository navigation
Narrow Predicate's fluent identifiers to what each predicate accepts - #224
Merged
simon-mundy merged 5 commits intoOct 9, 2026
Merged
Conversation
between(), equalTo(), in(), isNull(), like() and their siblings advertised int, float or array identifiers that the Between, Operator, In, IsNull and Like constructors reject, so such calls raised a TypeError one frame deeper. The fluent signatures now match, a test compares each one against its predicate's constructor, and the API listing in where-having.md shows the narrowed types. Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…e-signatures # Conflicts: # analyzer-baseline.toml
tyrsson
approved these changes
Oct 8, 2026
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.
Fixes #208.
The fluent methods on
Predicateaccepted identifier types that the predicates they build reject, so those calls raised aTypeErrorinside the predicate constructor.Changes
between()andnotBetween()takestring|ArgumentInterface|nullfor the identifier, and droparrayfrom the min and max values.equalTo(),notEqualTo(),lessThan(),lessThanOrEqualTo(),greaterThan()andgreaterThanOrEqualTo()takestring|ArgumentInterface|nullfor the left side.in(),notIn(),isNull()andisNotNull()takestring|ArgumentInterfacefor the identifier.like()andnotLike()takestring|ArgumentInterface|nullfor the identifier.docs/book/sql/where-having.mdshows the narrowed signatures, and how to pass a value on the left asArgument\Value.Breaking changes
int,floatandarraywith aTypeErrorat the fluent method. Every such call already raised aTypeErrorone frame deeper, so no working call is affected.mago format,mago lint,mago analyzeand the unit tests pass.