-
Notifications
You must be signed in to change notification settings - Fork 245
DRIVERS-3064 Add support for the rawData command option #1814
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
Conversation
fa93a58
to
0f8c6bd
Compare
- description: "listCollections with rawData option" | ||
runOnRequirements: | ||
- minServerVersion: "8.2.0" | ||
auth: false |
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.
Why do these tests require authentication to be disabled? My impression is that they should work just fine with or without auth. If so, let's remove the requirement, or alternatively document why this is necessary in a comment for future reference.
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.
8.2 does not support the rawDate
with listCollections
:
(Unauthorized) not authorized on database0 to execute command
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.
Changes LGTM.
Node impl mongodb/node-mongodb-native#4581. LGTM. |
- commandStartedEvent: | ||
command: | ||
listCollections: 1 | ||
filter: {} |
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.
While testing for a potential auth failure with PHP, I noticed that this test initially failed because PHP does not send an empty filter
field in the command. Since we're not testing for any filters, consider removing this line here and in the test below. Alternatively, use $unsetOrMatches
as both are equivalent.
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 in support of the above change. Although our CRUD spec denotes that find()
takes a required filter
parameter, it says nothing about the outgoing command. And if we consult the find command docs we'll see:
Optional. The query predicate. If unspecified, then all documents in the collection will match the predicate.
I think $$unsetOrMatches: {}
makes sense in this case.
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 with the filter
changes
Add support for the new rawData command option for the following CRUD operations:
Please complete the following before merging:
clusters).