Allow options in find() and findOne()

XMLWordPrintableJSON

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

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

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

                Created:
                Updated:
                Resolved: