Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6356

Provide a database stack in shell

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None

      Description

      It's common to jump between a number of databases in the shell. Having to type (even remember) the full name every time can be time consuming. It would be helpful for the shell to maintain a simple stack to jump between databases quickly.

      e.g.

      // Push another DB onto stack (and change to it)
      pushDb('some_db');
      // Pop current DB and change to new head.
      popDb();
      // Switch top two DBs (ala unix shell noarg pushd)
      pushDb();
      // Bring database at depth n to top of stack
      pushDb;
      // Show current stack
      listDbStack();
      // Discard stack
      clearDbStack();

      There is a related feature request to tab-complete database names in the shell. With these two features, the efficiency of a mongodb shell session could be enhanced.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-platform Backlog - Platform Team
            Reporter:
            crudson Doug Hudson
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: