After all the prep work in previous pull requests, here it is - in all its glory - the new count collections shell helper! :smile:
A typical explorative workflow in the mongo shell - which I've captured in the attached screenshot - can now be something along the lines of:
show dbs - to find out which databases exist on the server, incl. an indication of their respective sizes
count collections - to find out how many collections exists in each of these databases
use <database> - to switch to a given database
show collections - to find out which collections exists in this database, incl. an indication of their respective sizes
count documents - to find out how many documents exists in each of these collections
As you can see on the screenshot, I've adopted a color scheme: green for database names, blue for collection names... if you agree that using different colors for databases and collections is a good idea, then please let me know if you prefer different colors... I've made them configurable via config.js so it'd be a doddle to change them!
Hey @TylerBrock,
After all the prep work in previous pull requests, here it is - in all its glory - the new
count collections
shell helper! :smile:A typical explorative workflow in the mongo shell - which I've captured in the attached screenshot - can now be something along the lines of:
show dbs
- to find out which databases exist on the server, incl. an indication of their respective sizescount collections
- to find out how many collections exists in each of these databasesuse <database>
- to switch to a given databaseshow collections
- to find out which collections exists in this database, incl. an indication of their respective sizescount documents
- to find out how many documents exists in each of these collectionsAs you can see on the screenshot, I've adopted a color scheme: green for database names, blue for collection names... if you agree that using different colors for databases and collections is a good idea, then please let me know if you prefer different colors... I've made them configurable via
config.js
so it'd be a doddle to change them!