-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Compatibility issue with MySQL2 v3.9 #17141
Comments
If you think there's something that could be done from MySQL2 side, please ping me. |
Following a more detailed examination of the issue at hand, I'd like to provide additional insights that may help pinpoint the underlying cause and suggest directions for a potential solution. My analysis has focused on the handling of
|
Thank you for the thorough analysis of the issue, we'll look into it |
@wellwelwel Would it be a good idea to add functions for Also, it's really nice to see you in our repo ready to help! Note to self: dev branch is https://github.com/sequelize/sequelize/tree/ephys/17141 |
Thanks, @ephys. I really appreciate your comment 🙋🏻♂️✨ About improve
|
I definitely get not wanting to add features if If it's not meant to output the datetime string, I don't see another way to solve this than either having a separate method that produces that string, or by us implementing it ourselves based on the contents of the Buffer Good luck with figuring out the best solution! |
I found that the problem only happens when using bind. Example where the error does not occur:
Example where the error occurs:
Note. Note that even if I don't use bind, this happens. |
Issue Creation Checklist
Bug Description
Since the introduction of the
typeCast
option to theexecute
method in MySQL2 version 3.9 (see node-mysql2/pull/2398), we have encountered a problem with Sequelize implementations that assume aquery
method type cast, resulting in "Invalid Date" errors We have encountered a problem with "Invalid Date" errors in Sequelize implementations that assume typecasting of query methods.Reproducible Example
Here is the link to the SSCCE for this issue:
What do you expect to happen?
I expect the
callAt
field to retrieve a Datetime value, indicating the specific date and time of the call. The expected output for the query should look like this:Executing (default): SELECT id, callAt FROM calls WHERE type = 1 ORDER BY callAt DESC LIMIT 1 [ { id: 104138353, callAt: 2024-02-20T18:05:13.000Z } ]
What is actually happening?
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: