[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: |
|
||||
| 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.
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: Signed-off-by: Sam Kleinman <samk@10gen.com> |
| 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: Signed-off-by: Sam Kleinman <samk@10gen.com> |
| 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. |