Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2651

Suggestion for /manual/tutorial/generate-test-data/



    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.11
    • Component/s: manual
    • Labels:
    • # Replies:
    • Last comment by Customer:
    • Actual Time:


      I'm of the opinion that JS code examples should always use trailing semi-colons to be explicit. Additionally, using braces around the body of loops (e.g. for, while) helps.

      Third numeric bullet point in the "Insert Multiple Documents Using a For Loop" is numbered "1" instead of "3".

      The entry mentions using it to print more results after the first 20. I didn't find additional reference to the it command beyond db.collection.find(). I would have expected some coverage of it on Iterate a Cursor in the mongo Shell. If we have a full documentation entry on it, it would be good to link to that. If the page doesn't exist, perhaps we should have such a page, and also discuss how to customize the default number of results printed for each iteration, which I believe is a global shell variable.

      Store the function in your .mongorc.js file. The mongo shell loads the function for you every time you start a session.

      I think this should clarify that the mongo shell loads/parses the .mongorc.js file on startup, so the function will be available in future sessions. Saying that the "shell loads the function" seems to bypass the fact that it's really loading everything in the rc file, which could be helpful for newer users.




            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created:
                Days since reply:
                5 years, 19 weeks, 1 day ago
                Date of 1st Reply: