[DOCS-770] Fix eval documentation Created: 17/Nov/12  Updated: 30/Oct/23  Resolved: 19/Nov/12

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: v1.0
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Minor - P4
Reporter: Daniel Pasette (Inactive) Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 13 weeks, 2 days ago

 Description   

There is an extra curly brace here:

http://docs.mongodb.org/manual/reference/commands/#eval

 
db.eval( function { return 3+3 } } );
 
should be:
 
db.eval( function() { return 3+3 } );

There is no mention that the helper does not support the nolock option and needs to be run using the runCommand syntax.

Should show an actual example of running db.eval as a command, e.g.,

db.runCommand( { $eval: function() { return 3+3 }, nolock:true } );



 Comments   
Comment by auto [ 19/Nov/12 ]

Author:

{u'date': u'2012-11-19T22:20:38Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-770 addition
Branch: master
https://github.com/mongodb/docs/commit/7dc46747404be371f88e95101395c9f464ecda75

Comment by auto [ 19/Nov/12 ]

Author:

{u'date': u'2012-11-19T14:58:18Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-770 eval correction
Branch: master
https://github.com/mongodb/docs/commit/9ee50a82c0f33e77340c5f508606db24e6756f21

Comment by Sam Kleinman (Inactive) [ 19/Nov/12 ]

turns out it doesn't matter, dropping $ for consistency.

Comment by Sam Kleinman (Inactive) [ 19/Nov/12 ]

isn't it eval and not $eval as the command name?

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