[SERVER-16813] Shell helper to get a single collection's options document Created: 12/Jan/15 Updated: 13/Jan/17 Resolved: 13/Jan/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.8.0-rc4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kyle Erf | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
For writing jstests or general deployment debugging, it would be useful to have easy access to collection metadata. Previously, this data was available by querying the system.namespaces collection, but that is no longer supported with new storage engines. It would be very helpful to have a shell helper to wrap the listCollections command and return just the collection object for a single collection. This could be implemented as a db method, i.e.
or added to the collection prototype
|
| Comments |
| Comment by Justin Cohler [ 13/Jan/17 ] | |||||||||||
|
We are not focusing on new shell features at this point. | |||||||||||
| Comment by Matt Kangas [ 21/Jan/15 ] | |||||||||||
|
Talking to a 2.6 server:
Talking to a 2.8 server with storageEngine=mmapv1:
This was introduced in Aliasing the new behavior (only) as an options() method seems reasonable. | |||||||||||
| Comment by Kyle Erf [ 12/Jan/15 ] | |||||||||||
|
Looks like it does, thanks! That said, the name of that helper doesn't really explain the full scope of what it returns. We may want to consider aliasing it as options() or info() or something as well. | |||||||||||
| Comment by J Rassi [ 12/Jan/15 ] | |||||||||||
|
Does the db.foo.exists() helper provide the functionality you're looking for? |