Details
-
Task
-
Status: Backlog
-
Minor - P4
-
Resolution: Unresolved
-
5.0.6
-
None
-
None
-
MacOS 13.0.1, MongoDB Shell 1.6.1, Mongod 5.0.6
Description
Problem Statement/Rationale
Description of {{getCollectionInfos }}command's{{ nameOnly }}parameter is misleading in the documentation:
Documentation states that it has boolean type, but in fact it has document type: {{
{ nameOnly: true }}}
Steps to Reproduce
- Connect with {{mongosh}} to any database
- Run db.getCollectionInfos({}, true) command
Expected Results
It should return just the collection/view names and type.
Actual Results
It returns the collection/view names and all other information.
Additional Notes
But if we run db.getCollectionInfos({}, { nameOnly: true }), then we get the expected result.
Also, it's unclear where the 3rd parameter – authorizedCollections should go:
db.getCollectionInfos({}, { nameOnly: true, authorizedCollections: true }) |
|
// or
|
|
db.getCollectionInfos({}, { nameOnly: true }, { authorizedCollections: true }) |
Finally, documentation has 3 examples: https://www.mongodb.com/docs/manual/reference/method/db.getCollectionInfos/#example
but none of the examples show how to use{{ nameOnly }}or{{ authorizedCollections }}parameters.