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

Remove command-specific options in generic runCommand helper

    • 2
    • Needed
    • Needed
    • Hide

      V6 of the driver will have some breaking changes to `Db.command` and `Admin.command`. We have docs for these commands - https://www.mongodb.com/docs/drivers/node/current/usage-examples/command/.

      A section outlining on this page documenting that users of this API MUST specify all server options themselves would be nice. This is only relevant to v6+.

      Show
      V6 of the driver will have some breaking changes to `Db.command` and `Admin.command`. We have docs for these commands - https://www.mongodb.com/docs/drivers/node/current/usage-examples/command/ . A section outlining on this page documenting that users of this API MUST specify all server options themselves would be nice. This is only relevant to v6+.

      The Node driver's Db.command() helper currently supports all options that the command helpers support.  This is problematic for two reasons:

      Our `db.command()` helper should only consider options that are not command related (e.g, bson serialization options).

      Acceptance Criteria

      • Remove the following options in v6

      The following options are supported because of the inheritance design of our operations layer and should be removed:

        willRetryWrite?: any;
        omitReadPreference?: any;
        writeConcern?: any;
        explain?: any;
        readConcern?: any;
        collation?: any;
        maxTimeMS?: any;
        comment?: any;
        retryWrites?: any;
        dbName?: any;
        authdb?: any;
        noResponse?: any;
      

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: