Add static helpers to Mongo class that point to instance methods

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: UI / UX
    • None
    • 2
    • None
    • Developer Tools

      https://mongodb.slack.com/archives/CUHC9R8J0/p1708945011309839

      Users who read the docs pages (and skip over the examples section) could assume that they can run code like Mongo.getDBs(), when in reality they'd want db.getMongo().getDBs(). We could add/generate a set of static helper methods for Mongo that throws helpful errors, e.g. have Mongo.foo() throw something along the lines of Error: No such method `Mongo.foo()`. Did you mean `db.getMongo().foo(…)`?.

      We'd probably want to make sure that these methods do not end up included in autocomplete results.

            Assignee:
            Unassigned
            Reporter:
            Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: