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

listDatabases nameOnly setting is sent as NaN

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.7.0
    • Affects Version/s: 5.1.0, 4.14.0
    • Component/s: None
    • 0
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      What problem are you facing?

      When invoking:

      client.db().admin().listDatabases({ nameOnly: true });
      

      The nameOnly setting is ignored an NaN is always sent, see relevant src:

      https://github.com/mongodb/node-mongodb-native/blob/main/src/operations/list_databases.ts#L44

      AC

      • respect the nameOnly setting on the options object passed in by the caller
      • coerce the setting to boolean (alignment with listCollection nameOnly)
      • Add tests

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: