DRIVERS-3064 Add support for the rawData command option#1814
DRIVERS-3064 Add support for the rawData command option#1814qingyang-hu merged 10 commits intomongodb:masterfrom
Conversation
fa93a58 to
0f8c6bd
Compare
| - description: "listCollections with rawData option" | ||
| runOnRequirements: | ||
| - minServerVersion: "8.2.0" | ||
| auth: false |
There was a problem hiding this comment.
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.
8.2 does not support the rawDate with listCollections:
(Unauthorized) not authorized on database0 to execute command
|
Node impl mongodb/node-mongodb-native#4581. LGTM. |
| - commandStartedEvent: | ||
| command: | ||
| listCollections: 1 | ||
| filter: {} |
There was a problem hiding this comment.
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.
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.
Add support for the new rawData command option for the following CRUD operations:
Please complete the following before merging:
clusters).