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

throw when accessing databaseVersion before it is loaded internally #15267

Closed
4 of 8 tasks
ephys opened this issue Nov 10, 2022 · 0 comments · Fixed by #15346
Closed
4 of 8 tasks

throw when accessing databaseVersion before it is loaded internally #15267

ephys opened this issue Nov 10, 2022 · 0 comments · Fixed by #15346
Labels
type: feature For issues and PRs. For new features. Never breaking changes.

Comments

@ephys
Copy link
Member

ephys commented Nov 10, 2022

Issue Creation Checklist

  • I understand that my issue will be automatically closed if I don't fill in the requested information
  • I have read the contribution guidelines

Feature Description

Describe the feature you'd like to see implemented

We use databaseVersion internally to adapt our queries based on the feature set of the targeted version.

The problem is that this version is only fetched during the first connection to the database (or set manually through the Sequelize constructor option bag)

Right now, if it's not set, we default to our minimum supported version for that database. Instead, we should throw an error explaining to the user that the database version is unknown and that they should call sequelize.authenticate() first to fetch it, or configure it through sequelize's options

Describe why you would like this feature to be added to Sequelize

It would prevent subtle bugs

Is this feature dialect-specific?

  • No. This feature is relevant to Sequelize as a whole.
  • Yes. This feature only applies to the following dialect(s):

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I will need guidance.
  • No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
  • No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in implementing my feature.

Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature For issues and PRs. For new features. Never breaking changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant