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

Fix eval documentation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • v1.0
    • manual
    • None

    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 } );

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 13 weeks, 2 days ago