Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1182

Documentation for using Cursor.returnKey is incomplete, missing

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2.33
    • Component/s: None
    • Labels:

      The official documentation for Cursor.returnKey does not explain what values can be passed to it.

      The cursor example for every method in the class shows "10" as a valid value, but does not explain what it means:
      collection.find({}).returnKey(10) // Set the cursor returnKey

      The doc for the method itself ends abruptly before explaining what value to pass it:
      {{/**

      • Set the cursor returnKey
      • @method
      • @param {object}

        returnKey Only return the index field or fields for the results of the query. If $returnKey is set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields. Use one of the following forms:

      • @return {Cursor}

        */}}

      This is an issue with the documentation on the website as well, which matches the javascript documentation: http://mongodb.github.io/node-mongodb-native/2.2/api/Cursor.html#returnKey

            Assignee:
            rebecca.weinberger Rebecca Weinberger
            Reporter:
            james@rabb.it James Mitchell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: