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

Missing methods on JS builtins from the old shell: what should we support?

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.13.2
    • Affects Version/s: None
    • Component/s: snippets
    • None
    • 5
    • Iteration Z, Iteration Chicago
    • Needed
    • Hide

      The Mongo object supports an additional .getCollection() method that is undocumented in the legacy shell. `mongo.getCollection()` accepts a full namespace, i.e. <db>.<collection>.

      Show
      The Mongo object supports an additional .getCollection() method that is undocumented in the legacy shell. `mongo.getCollection()` accepts a full namespace, i.e. <db>.<collection> .

      The old shell added a number of functions to JS builtins that we're currently missing, and that we might want for script compatibility at least:

      https://github.com/mongodb/mongo/blob/eb2b72cf9c0269f086223d499ac9be8a270d268c/src/mongo/shell/types.js

      plus Object.bsonsize (an alias for the global bsonsize, and from the looks of it, the only documented utility).

      These are a lot of functions, and we may not want all of them.

      Differences doc: https://docs.google.com/document/u/1/d/1ssisfyD1BskYfc2XR-rGvypnvhT9llw_Z47zp420dME/edit

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: