Skip to content
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: overhaul test suite of attribute(s)ToSQL #17121

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

WikiRik
Copy link
Member

@WikiRik WikiRik commented Feb 25, 2024

Description of Changes

Attempt 2 on overhauling the test suite for attributesToSQL and attributeToSQL. I also did some minor improvements to the functions.

Closes #15533

TODOs

  • Confirm what is desired behaviour
  • Type attributeToSQL
  • Type attributesToSQL

Future PRs

  • Rename to attributesToSql and attributeToSql respectively
  • Clean up createTableQuery unit tests
  • Move usages of attributesToSQL to queryGenerator so both can become internal functions
  • Throw if invalid options/column keys are used (like comment for sqlite)
  • Remove weird behaviour surrounding schema's that are used in functions that call attribute(s)ToSQL (breaking change)

List of Breaking Changes

@WikiRik
Copy link
Member Author

WikiRik commented Mar 22, 2024

@ephys even though it's in draft; could you take a look at the test cases that we do? As mentioned in the TODOs above, there is still work to be done but I want to confirm that this is how people can use these functions before cleaning up test suites and add typings.

@WikiRik
Copy link
Member Author

WikiRik commented Mar 30, 2024

I'll mark it as ready for review since the bulk of the work is done. It's not ready for merging yet, since I want to know if there's any tests that have unwanted behaviour before I work on typing the functions.

@WikiRik WikiRik marked this pull request as ready for review March 30, 2024 15:57
@WikiRik WikiRik requested a review from a team as a code owner March 30, 2024 15:57
@WikiRik WikiRik requested a review from ephys March 30, 2024 15:57
@sequelize-bot sequelize-bot bot added the conflicted This PR has merge conflicts and will not be present in the list of PRs to review label Apr 10, 2024
@sequelize-bot sequelize-bot bot removed the conflicted This PR has merge conflicts and will not be present in the list of PRs to review label Apr 12, 2024
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.

None yet

1 participant