-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(NODE-6503): Add Int32 to SchemaType #15054
feat(NODE-6503): Add Int32 to SchemaType #15054
Conversation
I've reopened the PR against the fork, here. Here's a link to you open comment thread, so we can follow-up on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If it's ok with you, I will merge this into the 8.9 branch so we can merge it with the rest of the 8.9.0 release.
That works for me, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I will merge this into 8.9 branch.
This PR follows the one opened on the mongodb fork, Val's initial round of feedback has been addressed.
Summary
Motivation
Support a 32-bit integer type in mongoose for compatibility with CSFLE/QE. The current
Number
schema type can result in either Int32, Int64, or Doubles that are inserted into the database using type inference but CSFLE and QE require exact BSON types in schemas.Summary of Changes
SchemaType
Int32
, which has the following behavior:cast
method throws when provided aNaN
$type: int
or$type: number
, but NOT$type: double
Example