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

Allow options in find() and findOne()

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.15.4
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • Needed
    • 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.
    • Iteration Firenze

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

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

              Created:
              Updated:
              Resolved: