-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(selectQuery): Don't add empty HAVING clause #8931
Conversation
Never mind, added one. |
e2047fd
to
f97fa72
Compare
return { | ||
subQuery: true, | ||
tableAs: 'test', | ||
having: { creationYear: { gt: 2002 } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Op.gt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. I didn't do this because none of the tests seem to use Op
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In v5 all tests will move to operators, this is something we are doing with new tests
Thanks for merging! |
Thanks for contributing 👍 |
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
When querying with empty
having
object, the query contains an emptyHAVING
clause. The code processing thewhere
object checks if it contains any statements, the code processinghaving
didn't. I added that.