Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dvsweeney9
Copy link
Contributor

@dvsweeney9 dvsweeney9 commented Oct 14, 2022

Addresses #5350
Except is a valid SQL keyword https://www.tutorialspoint.com/sql/sql-except-clause.htm
This is functionality that is blocking my project.

Summary

  • adds .except() as a function to the query builder. .except() works exactly like .union() or .intersect().
  • updates .intersect() to use reusable code.
  • Adds unit tests for .except() that mimic those of .intersect().
  • Updates the knex types.

The documentation PR is available here: knex/documentation#468

@roy-kim-33
Copy link

is there any progress on this?

Copy link
Collaborator

@kibertoad kibertoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks a lot of tests by removing all assertions from them.

Please add assertions to all new tests and restore them in prior ones.

@dvsweeney9
Copy link
Contributor Author

This breaks a lot of tests by removing all assertions from them.

Please add assertions to all new tests and restore them in prior ones.

This PR doesn't edit any previous tests, it only indents them to meet linting standards. I'm happy to add new assertions to the old tests to make them usable but was unsure if this was expected.

@kibertoad
Copy link
Collaborator

@dvsweeney9 Ah, apologies, tests shifted visually a lot, so old tests without assertions look like they replaced the other ones which had assertions.

No need to fix old ones (although that would also be welcome), but if you could add assertions to new tests, that should suffice, and this PR could be merged then.

@dvsweeney9
Copy link
Contributor Author

@kibertoad I ended up adding assertions to the old tests as well as the new tests and restructured them to match the .intersect() testing style

@dvsweeney9 dvsweeney9 requested a review from kibertoad January 10, 2023 16:03
@dvsweeney9
Copy link
Contributor Author

@kibertoad quick ping

@coveralls
Copy link

Coverage Status

Coverage: 92.423% (+0.05%) from 92.369% when pulling 7dbb52e on dvsweeney9:feature/new-keyword-except/issue-5350 into 3475d81 on knex:master.

@OlivierCavadenti OlivierCavadenti self-requested a review March 29, 2023 08:06
@OlivierCavadenti OlivierCavadenti removed their assignment Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants