1. Seems that necessary to change <collection_name> on <namespace>|<collection_name> all over documentation. <namespace> is term from MongoDB documentation - A “namespace” is the concatenation of the database name and the collection names with a period character in between. Because all statements described in the our doc allow using such namespace instead <collection_name>. Also due to statement USE we can write just <collection_name>. That is why <namespace>|<collection_name>. E.g.
DELETE [ALL | ONE] FROM namespace | collection_name [WHERE condition]
2. Using <namespace> will simplify SHOW commands:
SHOW COLLECTIONS [database | namespace | collection]
SHOW FIELDS namespace | collection or to show also all fields in the DB: SHOW FIELDS [database | namespace | collection]
SHOW INDEXES [database | namespace | collection]
SHOW INDEXFIELDS namespace[.indexname] | collection[.indexname]
3. Necessary to correct documentation for statement RENAME COLLECTION. Word "dropTarget" should be removed from the statement and from the description. Also as collections can be from different databases better use namespace. E.g.
RENAME COLLECTION source_namespace | source_collection TO target_namespace | target_collection [ DROP_TARGET]
1. Added a note at the beginning of the Query Reference document.
2. I don't think the suggested syntax will simplify the commands. For example, SHOW COLLECTIONS [database | namespace | collection], how can we tell if the specified name refers to a database or collection?
3. Fixed RENAME COLLECTION syntax in the Query Reference document.
Issue #9146 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
1. Added a note at the beginning of the Query Reference document.
2. I don't think the suggested syntax will simplify the commands. For example, SHOW COLLECTIONS [database | namespace | collection], how can we tell if the specified name refers to a database or collection?
3. Fixed RENAME COLLECTION syntax in the Query Reference document.