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

Allow users to easily query for the list of Views in their database

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Storage Execution
    • Fully Compatible

      Currently, it is a little bit tricky to determine the list of views in a database. There are two options:

      1. Specifically grant access to the find action on the system.views collection.
      2. Call listCollections and filter for all entries returned that do not have an options.storageEngine field.

      The first option is both tedious (grant needs to be performed for the system.views collection on every database) and also probably not something we really want users to rely on. (See SERVER-27554).

      The second is a little obscure. It does not seem reasonable to assume that an external user can piece together that a view is a collection without a storageEngine.

      Suggestion: add a new field to each entry in the output of listCollections that indicates whether or not the entry represents a collection or a view, and add a new option for the supported filters on the listCollections command so that a list of only-views can be returned.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            cailin.nelson@mongodb.com Cailin Nelson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: