-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[11.x] Add whereNotAll
method to the query builder
#52361
Conversation
If merged I will open a PR to doc. |
Please rebase so tests pass, thanks! |
This PR got me really thinking about the naming of the I propose renaming
If we make this change, our method names would be:
The name If you agree, I'll create a PR with the |
@einar-hansen Yup. I agree with you even when I was thinking about the |
@lmottasin you might want to update the docblocks to accept Expression and set operator to mixed. Take a look here:
|
I honestly find this entire method really confusing and wouldn't use it in any apps because I have to think so hard about the negations. 😅 |
Overview
In PR #50344, the
whereAll
andwhereAny
methods were introduced to enhance the framework's querying capabilities. Subsequently, PR #52260 introduced thewhereNone
method, which complementswhereAny
by providing a negated alternative.To further complete the logical set, this pull request introduces the
whereNotAll
method. This method serves as the opposite ofwhereAll
and allows users to query for records where not all of the specified columns meet the given condition. By includingwhereNotAll
, we finalize the logical quartet of "any," "all," "none," and "notAll."This addition provides a comprehensive set of methods for handling complex constraints across multiple columns, enhancing the flexibility of the query builder.
Usage
The
whereNoAll
method works as follows: