-
-
Notifications
You must be signed in to change notification settings - Fork 6.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: datetime2 rounding in mssql #7264
fix: datetime2 rounding in mssql #7264
Conversation
Thank you for contribution! Are these changes backward compatible with previous mssql package versions? |
Yes, the test suite doesn't pass without modification for To test this with version 6 I needed to update a few tests.
But given the above modifications it all passes with this PR and no change to the |
I also double checked the v6 JSDoc typing and that also states a string. https://github.com/tediousjs/node-mssql/blob/375419b590036bb8566bfc4452caa18b2ed444cd/lib/base/request.js#L100 And the same for v5 So it seems it should have always been a string but never actually mattered until now |
@pleerock do you need anything more or are you waiting for v7 to be fully released? |
I can confirm that we followed the same update path in our project to fix the same bug and have encountered the same error. Thank you @tgandrews |
This upgrades the `mssql` driver to version 7 to resolve #3202. This issue was created in the bulk insert test adding a datetime2 field with a time of midnight. v7 no longer allows numeric parameter names and was throwing an error inside tedious but you can see that `node-mssql` is expecting a string. https://github.com/tediousjs/node-mssql/blob/76585f973dd8cad48836fe302f99f67d47ff6129/lib/base/request.js#L101 Another user saw this issue in the comments of issue #3202. #3202 (comment) Stringifying the numeric parameter names before it enters the driver resolves this issue. Now all mssql tests pass locally once you provide additional config in `ormconfig.json` locally required for a locally running docker instance of mssql which uses a self signed certificate. ```json "extra": { "trustServerCertificate": true } ```
This has been bumped to |
thank you for contribution! |
This upgrades the `mssql` driver to version 7 to resolve typeorm#3202. This issue was created in the bulk insert test adding a datetime2 field with a time of midnight. v7 no longer allows numeric parameter names and was throwing an error inside tedious but you can see that `node-mssql` is expecting a string. https://github.com/tediousjs/node-mssql/blob/76585f973dd8cad48836fe302f99f67d47ff6129/lib/base/request.js#L101 Another user saw this issue in the comments of issue typeorm#3202. typeorm#3202 (comment) Stringifying the numeric parameter names before it enters the driver resolves this issue. Now all mssql tests pass locally once you provide additional config in `ormconfig.json` locally required for a locally running docker instance of mssql which uses a self signed certificate. ```json "extra": { "trustServerCertificate": true } ``` (cherry picked from commit 4711a71)
This upgrades the `mssql` driver to version 7 to resolve typeorm#3202. This issue was created in the bulk insert test adding a datetime2 field with a time of midnight. v7 no longer allows numeric parameter names and was throwing an error inside tedious but you can see that `node-mssql` is expecting a string. https://github.com/tediousjs/node-mssql/blob/76585f973dd8cad48836fe302f99f67d47ff6129/lib/base/request.js#L101 Another user saw this issue in the comments of issue typeorm#3202. typeorm#3202 (comment) Stringifying the numeric parameter names before it enters the driver resolves this issue. Now all mssql tests pass locally once you provide additional config in `ormconfig.json` locally required for a locally running docker instance of mssql which uses a self signed certificate. ```json "extra": { "trustServerCertificate": true } ```
fix: datetime2 rounding in mssql (typeorm#7264)
Description of change
This upgrades the
mssql
driver to version 7 to resolve #3202. Thisissue was created in the bulk insert test adding a datetime2 field
with a time of midnight.
v7 no longer allows numeric parameter names and was throwing an error
inside tedious but you can see that
node-mssql
is expecting a string.https://github.com/tediousjs/node-mssql/blob/76585f973dd8cad48836fe302f99f67d47ff6129/lib/base/request.js#L101
Another user saw this issue in the comments of issue #3202.
#3202 (comment)
Stringifying the numeric parameter names before it enters the driver
resolves this issue.
Now all mssql tests pass locally once you provide additional config in
ormconfig.json
locally required for a locally running docker instanceof mssql which uses a self signed certificate.
Pull-Request Checklist
master
branchnpm run lint
passes with this changenpm run test
passes with this changeFixes #0000