[DOCS-2651] Suggestion for /manual/tutorial/generate-test-data/ Created: 03/Feb/14  Updated: 16/Mar/15  Resolved: 16/Sep/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.11

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Tim Slavin
Resolution: Done Votes: 0
Labels: audit-2014
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 9 years, 22 weeks, 1 day ago

 Description   

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.



 Comments   
Comment by Githook User [ 16/Sep/14 ]

Author:

{u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}

Message: DOCS-2651: Suggestion for /manual/tutorial/generate-test-data/

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: v2.4
https://github.com/mongodb/docs/commit/5ccffa819c519ef9b5c2201670c8a6dec8286e20

Comment by Githook User [ 16/Sep/14 ]

Author:

{u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}

Message: DOCS-2651: Suggestion for /manual/tutorial/generate-test-data/

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/dc6820351eb98206226258c6f1e26c64515af385

Comment by Jeremy Mikola [ 03/Feb/14 ]

A recent dev mailing list post from buzz.moschetti mentioned his new library, ipsum, for generating random BSON data to test MongoDB apps. Some related content is json-schema.org and our cookbook entry for random attributes. This could be relevant as further reading for users looking to create test data.

Generated at Thu Feb 08 07:43:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.