-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(NODE-3150): allow retrieving PCRE-style RegExp #2840
Conversation
ec840aa
to
9d55e09
Compare
I noticed our BSON library has this option to deserialize to the native Also to note is that the Java BSON library also behaves in the same way as Ruby, so that may be common across more drivers as well. |
I don't have further background on this, we have a precedent of other values being auto converted with the Maybe as a separate effort we should take a look at the BSON library catching a Regexp decoding error and using BSONRegex automatically instead of failing, although I imagine that would also need a flag. |
Yeah it's a weird one since it is backwards breaking anyways so I guess we are stuck with a flag. Thanks for the clarification. |
I would also change the description not to mention |
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.
Some test clean up requests, driver changes LGTM
test/unit/bson_regex.test.js
Outdated
const db = client.db('a', { bsonRegExp: true }); | ||
const collection = db.collection('b'); |
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.
We should use a better db/collection name here
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.
I'm LGTM once @nbbeeken 's test change requests are in.
66e4bc6
to
aadbabb
Compare
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
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
Description
bsonRegExp
option to commands, collections, and dbsbsonRegExp
option