Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-857

Allow options in find() and findOne()

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15.4
    • Component/s: Shell API
    • Labels:
      None
    • Documentation Changes:
      Needed
    • Documentation Changes Summary:
      Hide
      .find() and .findOne() take an optional third argument now (after the filter argument and the optional projection argument).

      This argument supports all options in http://mongodb.github.io/node-mongodb-native/4.0/interfaces/findoptions.html.

      For example, {{promoteLongs: true}} can be used to receive JS numbers instead of BSON Long objects where possible.
      Show
      .find() and .findOne() take an optional third argument now (after the filter argument and the optional projection argument). This argument supports all options in http://mongodb.github.io/node-mongodb-native/4.0/interfaces/findoptions.html . For example, {{promoteLongs: true}} can be used to receive JS numbers instead of BSON Long objects where possible.
    • Sprint:
      Iteration Firenze

      Description

      We should allow .find() and .findOne() to take options, as mentioned in MONGOSH-623.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anna.henningsen Anna Henningsen
              Reporter:
              anna.henningsen Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: