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

Allow passing Mongo instance as first argument to Mongo ctor

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.1
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 1
    • Needed
    • Hide

      Mongo(db.getMongo()) now creates a Mongo instance with the same connection string as the original Mongo instance.

      Show
      Mongo(db.getMongo()) now creates a Mongo instance with the same connection string as the original Mongo instance.
    • Iteration Octopus

      This is a hopefully less controversial alternative to MONGOSH-545. I frequently find myself writing Mongo(db.getMongo()._uri), but since _uri is not public or supported and might not become at any point, it would be nice if at least Mongo(db.getMongo()) worked (with the same semantics).

            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: