[SERVER-13225] Warn about operations on non-existing collections in Mongo Shell Created: 17/Mar/14 Updated: 10/Dec/14 Resolved: 01/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | ?ukasz Wiktor [X] | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
When user tries to perform a command on a collection that doesn't exist then the mongo shell accepts it silently. In some cases that's fine. For example inserting a document creates a collection if it doesn't exist. However, there are other situations when it would be useful to get a warning about non-existing collection. Especially db.collection.update doesn't show any result and hence it's hard to distinguish if the command was correct (in terms of collection name). |
| Comments |
| Comment by ?ukasz Wiktor [X] [ 17/Mar/14 ] |
|
Find command could also warn about non-existing collection, though in this case it's easier to realize that there is a typo in collection name. I would be fully satisfied if I saw these warnings explicitly but I can live with just presenting write result - it's a good step forward. |
| Comment by Scott Hernandez (Inactive) [ 17/Mar/14 ] |
|
In the new shell writes return what was done, so it should be moot now. Are |