Add null Safe equal Filter method#312
Open
nwcm wants to merge 2 commits into
Open
Conversation
|
@nwcm is attempting to deploy a commit to the Beyond The Cloud Team on Vercel. A member of the Team first needs to authorize it. |
nwcm
marked this pull request as ready for review
June 19, 2026 05:34
Member
|
Hi! To do that, we can use https://soql.beyondthecloud.dev/soql/api/soql-filter#ignorewhen |
Contributor
Author
|
Ah I missed that one. Thought it was only on FilterGroup. Personally, I like the idea of having a clean single method on Filter but this will work |
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.
Description
Currently Filter.equal() is not null safe. Calling
Filter.with('Field__c').equal(couldBeNullVariable)May result in
Field__c = NULLwhich will include out of scope records unless additional.isNotNull().This is not a breaking change, just an optional method which developers can chose to implement.
At the moment it dynamically chooses between
Field__c = valueandField__c != NULLbased on the input variable. We could add both conditions over this dynamic placement.Type of Change
Changes Made
Related Issues
n/a
Testing
npm test)npm run lint)npm run prettier:verify)Screenshots
Checklist
Additional Notes