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

Add public API for Mongo._uri field

    • 1
    • Needed
    • Hide

      The underlying work introduces a publicly accessible method `getURI` on connection object - Mongo. `Mongo.getURI()` will return the connection string for the current active connection.

      Example Usage:

      • `db.getMongo().getURI()`
      • `new Mongo().getURI()`
      Show
      The underlying work introduces a publicly accessible method `getURI` on connection object - Mongo. `Mongo.getURI()` will return the connection string for the current active connection. Example Usage: `db.getMongo().getURI()` `new Mongo().getURI()`
    • Iteration Turtle

      Making the URI for a Mongo instance programmatically accessible would help with creating new Mongo instances based on it. It should be enough to expose the `_uri` field in a more public manner (e.g. `mongo.getURI()` or `mongo.uri`).

            Assignee:
            himanshu.singh@mongodb.com Himanshu Singh
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: